powershell下配置vim

powershell下配置vim

【参考1】http://www.wowotech.net/soft/vim_in_powershell.html

【参考2】https://blog.csdn.net/qq_37933114/article/details/82932840

【参考3】http://www.mitgai.net/2016/04/windows/setup-vim-to-work-with-powershell.html

  • 参考1很清楚
  • 参考2有图
  • 参考3讲的很详细,这里只记下主要代码和步骤

主要代码和步骤

  1. 下载vim: https://www.vim.org/download.php#pc
  2. 安装vim,注意记下安装路径
  3. 以管理员身份打开Windows PowerShell,执行Set-ExecutionPolicy RemoteSigned命令,输入 Y 回车
  4. 使用new-item命令,创建一个PowerShell的配置文件Profile new-item -path $profile -itemtype file -force
  5. 编辑配置文件(notepad $profile),添加vim相关的alias
set-alias vim "C:/Program Files/Vim/vim81/vim.exe" #注意安装路径要用自己的
 
# To edit the Powershell Profile
# (Not that I'll remember this)
Function Edit-Profile
{
    vim $profile
}

# To edit Vim settings
Function Edit-Vimrc
{
    vim $HOME\_vimrc
}

powershell常用命令

https://www.jianshu.com/p/b69040c074b7

猜你喜欢

转载自my.oschina.net/u/3304023/blog/2961667
今日推荐