PowerShell使用vim
- 下载安装Windows下的vim;
- 设置PowerShell环境,能使用“allow scripts to run”,步骤如下:
Set-ExecutionPolicy RemoteSigned提示输入Y
- 使用new-item命令,创建PowerShell的配置文件Profile
new-item -path $profile -itemtype file -force
- 编辑profile(notepad $profile),添加相关的alias
set-alias vim "D:/software/Vim/vim80/./vim.exe"# To edit the Powershell Profile# (Not that I'll remember this)Function Edit-Profile{ vim $profile}# To edit Vim settingsFunction Edit-Vimrc{ vim $HOME\_vimrc}
- 重启powershell
vim编码问题提
gvim安装目录下的_vimrc文件中,添加如下配置:
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" vim7.1在windows下的编码设置。By Huadong.Liu""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""set encoding=utf-8set fileencodings=utf-8,chinese,latin-1if has("win32") set fileencoding=chineseelse set fileencoding=utf-8endif"解决菜单乱码source $VIMRUNTIME/delmenu.vimsource $VIMRUNTIME/menu.vim"解决consle输出乱码language messages zh_CN.utf-8