一、去Vim官網下載適合操做系統的可執行文件php
地址:https://www.vim.org/download.php#pcvim
二、找到Vim文件夾中的vimrc文件進行修改,增長下面這4行。bash
set encoding=utf-8 set termencoding=utf-8 set fileencoding=utf-8 set fileencodings=ucs-bom,utf-8,chinese,cp936
三、在C:\Windows\System32\WindowsPowerShell\v1.0目錄下新建profile.ps1文件,複製下面的代碼到profile.ps1文件中。this
# There's usually much more than this in my profile! $SCRIPTPATH = "C:\Program Files (x86)\Vim" $VIMPATH = $SCRIPTPATH + "\vim80\vim.exe" Set-Alias vi $VIMPATH Set-Alias vim $VIMPATH # for editing your PowerShell profile Function Edit-Profile { vim $profile } # for editing your Vim settings Function Edit-Vimrc { vim $home\_vimrc }
四、重啓Shell,執行Set-ExecutionPolicy RemoteSigned命令修改模式就能夠了。操作系統
Set-ExecutionPolicy RemoteSigned
It's all!blog