powershell下配置vim

powershell下配置vim

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

【参考2】http://www.javashuo.com/article/p-nwysqmfx-em.htmlhtml

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

  • 参考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/b69040c074b7vim

相关文章
相关标签/搜索