参考资料:
http://www.cnblogs.com/Gbeniot/archive/2014/05/29/3760070.html
4步走:
1,安装插件管理工具
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
如果出现github.com 403 ,可能是本机的的hosts配置有问题
2, 设置~/.vimrc
vim
:e $VIMRUNTIME/vimrc_example.vim
:saveas! ~/.vimrc
3,添加以下内容到 ~/.vimrc
"配置 vundel
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
"这是vundle本身的设置
Bundle 'gmarik/vundle'
" My Bundles here:
"这里是设置你自己自定义的插件的设置vundle设置,注意:下载的插件git为:https://github.com/godlygeek/tabular.git,则设置为Bundle 'godlygeek/tabular';https://github.com/gmarik/vundle.git设置则为 Bundle 'gmarik/vundle'
" original repos on github
Bundle 'godlygeek/tabular'
" vim-scripts repos,vim-scripts的访问地址,格式则如下:
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'matchit.zip'
Bundle 'moria'
Bundle 'word_complete.vim'
Bundle 'SuperTab'
Bundle 'xptemplate'
Bundle 'ctags.vim'
Bundle 'taglist.vim'
Bundle 'winmanager'
Bundle 'Command-T'
" non github repos ,非git的访问地址的,格式如下:
"Bundle 'git://git.wincent.com/command-t.git'
" ...
Bundle 'https://github.com/scrooloose/nerdtree.git'
filetype plugin indent on " required!
"
"Brief help
":BundleList - list configured bundles
":BundleInstall(!) - install(update) bundles
":BundleSearch(!) foo - search(or refresh cache first) for foo
":BundleClean(!) - confirm(or auto-approve) removal of unused bundles
"
"see :h vundle for more details or wiki for FAQ
"NOTE: comments after Bundle command are not allowed..
"添加目录树,按F5打开目录
nnoremap <silent> <F5> :NERDTree<CR>
"Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not
let Tlist_Ctags_Cmd = '/usr/local/bin/ctags' loaded.
4, 安装插件
:BundleInstall