vim插件管理器vundle

1.创建bundle路径。

mkdir ~/.vim/bundle

 

2.clone vundle项目。

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

(第一次clone没创建vundle路径时失败,难道还要创建vundle路径?)

 

3.在.vimrc或/etc/vim/vimrc里添加下面内容。

注:如果没有.vimrc则在/etc/vim/vimrc里添加。

set nocompatible

filetype off                              " 先关闭文件类型

set rtp+=~/.vim/bundle/vundle             " 将vundle路径添加到插件vim路径

call vundle#rc()                          " 执行Vundle初始化

Bundle 'gmarik/vundle'                    " 将Vundle加入到bundle

filetype indent plugin on                 " 安装完后打开文件类型
 
4.添加更多插件。
如需加上插件则在Bundle 'gmarik/vundle'后加上相应的Bundle,如果是github则可以只输入后面的相对路径,如果是其他git则需输入全部url,下面给出一个完整的例子:
set nocompatible

filetype off

set rtp+=~/.vim/bundle/vundle

call vundle#rc()

Bundle 'gmarik/vundle'

"Bundle "MarcWeber/vim-addon-mw-utils"

"Bundle "tomtom/tlib_vim"

"Bundle "honza/snipmate-snippets"

"Bundle "garbas/vim-snipmate"

Bundle "Shougo/neocomplcache"

Bundle "Lokaltog/vim-powerline"

Bundle "drakeguan/vim-vcscommand"

Bundle "scrooloose/nerdtree"

Bundle "pix/vim-taglist"

Bundle "nathanaelkane/vim-indent-guides"

Bundle "clones/vim-cecutil"

Bundle "tpope/vim-fugitive"

"Bundle "c9s/bufexplorer"

Bundle "jnwhiteh/vim-golang"

Bundle "kevinw/pyflakes-vim"

Bundle "mbriggs/mark.vim"

"Bundle "vim-scripts/TabBar"

Bundle "vim-scripts/DrawIt"

Bundle "vim-scripts/calendar.vim--Matsumoto"

Bundle "vim-scripts/Python-mode-klen"

"Bundle "vim-scripts/pydoc.vim"

Bundle "vim-scripts/VOoM"

Bundle "vim-scripts/qiushibaike"

Bundle "vim-scripts/AuthorInfo"

Bundle "vim-scripts/javacomplete"

Bundle "vim-scripts/javaDoc.vim"

Bundle "drmingdrmer/xptemplate.git"

Bundle "vim-scripts/Java-Syntax-and-Folding"



filetype indent plugin on
 
5.保存.vimrc或/etc/vim/vimrc里的内容并退出。
 
6.重新打开任意一个vim窗口,

在命令模式下输入

:BundleList    //会显示你vimrc里面填写的所有插件名称

:BundleInstall  //会自动下载安装或更新你的插件。

 

 

PS: https://github.com/vim-scripts 和 http://vim-scripts.org/vim/scripts.html 这两个网站上都是vim-scripts的插件,即你只需在vimrc中添加你想要的插件名称即可。

你可能感兴趣的:(vim)