以前关于gvim的博客中提到的不少插件安装比较繁琐,这一篇来介绍一下gvim管理插件的插件--vundle的安装以及使用,让givm的插件安装更加的简单git
首先给出vundle的git地址github
https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windowsvim
1.提早准备windows
首先咱们须要在windows下安装git,顺便说一句git真的比svn好用bash
window git下载地址以下curl
https://git-scm.com/download/winsvn
这个版本已经按照博文中说的自带curlui
2.打开git bashurl
运行以下命令spa
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
将git克隆到系统当前用户目录的.vim文件夹下,通常会是C:/Users/username/.vim/bundle/Vundle.vim
3.打开_vimrc,加入以下配置
"vundle start
set nocompatible " be iMproved, required
filetype off " required
" 将Vundle插件的目录添加到gvim的运行时变量中
set rtp+=$HOME/.vim/bundle/Vundle.vim/
call vundle#begin('$USERPROFILE/.vim/bundle/') " All of your Plugins must be added before the following line Plugin 'VundleVim/Vundle.vim' Plugin 'scrooloose/nerdtree' call vundle#end() " required filetype plugin indent on " required "vundle end
4.在
call vundle#end() " required
和
call vundle#end() " required
加入你要安装的插件,这里我安装了以前提到到NerdTree
Plugin 'scrooloose/nerdtree'
5.在givm命令模式中运行以下命令
:PluginInstall
安装成功会提示以下
6.在_vimrc文件中添加对应的配置就能够使用了
"autocmd vimenter * NERDTree map <F2> :NERDTreeToggle<CR> "nerdtree end
7.完成图,其余插件的安装大同小异