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

相關文章
相關標籤/搜索