流程:shell
打开windows Powershell的位置:"C:/Windows/System32/WindowsPowerShell/v1.0", 在此路径下添加一个名为profile.ps1的文件,打开编辑,输入文本:vim
# There's usually much more than this in my profile! $SCRIPTPATH = "C:\Program Files\Git\usr\share\vim" # 此行根据$VIMPATH寻找相应vim路径便可 $VIMPATH = "C:\Program Files\Git\usr\bin\vim.exe" # 此行为1中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 }
Done, 以管理员权限打开Powershell,输入:windows
Set-ExecutionPolicy RemoteSigned
y肯定以后,vim即可以使用了。this
Tips:code