1.下载vim,看这篇
https://my.oschina.net/bysu/blog/852786
2.下载git,安装
http://download.youkuaiyun.com/download/u010668495/9231643
或者官方下载地址:https://git-for-windows.github.io/,这个比较慢
打开cmd,输入 git --version,出现版本号,即是成功。
3.在git安装目录下的cmd文件夹(如果安装的时候没有加入环境变量path中,需要手动加入)中创建curl.cmd文件,写入如下内容:
@rem Do not use "echo off" to not affect any child calls.
@setlocal
@rem Get the abolute path to the parent directory, which is assumed to be the
@rem Git installation root.
@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\mingw64\bin;%PATH%
@rem !!!!!!! For 64bit msysgit, replace 'mingw' above with 'mingw64' !!!!!!!
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%
@curl.exe %*
在cmd中输入,curl -version,不出现没有curl命令之类的提示,即为成功
4.从git中下载vundle到vim安装目录的vimfiles文件夹中
git clone https://github.com/gmarik/vundle "D:\Program Files\Vim\vimfiles\bundle\vundle"
此过程若下载到一半出现失败,多试几次即可
5.到“vim安装目录\vimfiles\bundle\Vundle.vim\test”
中把vimrc文件替换vim目录中原来的_vimrc配置文件,并把vimrc重命名为_vimrc。记事本打开替换后的_vimrc文件。
把
"exec 'set rtp^='.bundle_dir.'Vundle.vim/'
"call vundle#rc(bundle_dir)
替换为
set rtp+=$VIM/vimfiles/bundle/Vundle.vim/
call vundle#begin('$VIM/vimfiles/bundle/')
6.用gvim打开任意文件,如果不自动下载,可以按esc键,输入VundleInstall即可
注意:以上配置可能每次一打开gvim,都会vundle自动下载,很是烦人,参考下面代码段在_vimrc中加入相关代码。
let hasVundle=1 "在_vimrc文件开头加上这个
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle..."
echo ""
silent !mkdir -p ~/.vim/bundle
silent !git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/vundle
let hasVundle=0
endif
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
这里配置你的插件列表xxx
if hasVundle == 0 "在_vimrc文件结尾加上:从这里到结束的这段
echo "Installing Plugins, please ignore key map error messages"
echo ""
:PluginInstall
endif
参考:
http://blog.youkuaiyun.com/myloveqingmu/article/details/52518563
https://segmentfault.com/q/1010000006858045?_ea=1155123