0.简介
Vundle是Vim Bundle的缩写,是一个Vim插件管理工具。
Vundle allows you to…
- keep track of and configure your plugins right in the .vimrc
- install configured plugins (a.k.a. scripts/bundle)
- update configured plugins
- search by name all available Vim scripts
- clean unused plugins up
- run the above actions in a single keypress with interactive mode
Vundle automatically…
- manages the runtime path of your installed scripts
- regenerates help tags after installing and updating
1.安装方法
1.1 从git上拉取项目
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
1.2 将以下的配置命令放在.vimrc文件的最开头。
" 表明不与Vi兼容,因为如果与Vi兼容,很多强大的功能无法使用
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
" running time path 的缩写,即我们到哪里去找插件
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" [Vim Markdown插件]
" vim高亮显示Markdown语法
Plugin 'morhetz/gruvbox'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
" 不同形式的插件支持方式,各种形式的Plugin一定要在begin/end之间
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" Github上的插件,直接写账户/项目名就可以
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" vim-scriptes网站上插件
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
" 也是git仓库,但是不是Github上的插件,比如公司内的git仓库
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
” 本地的插件形式
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" 同一个不同版本
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
call vundle#end() " required
" 开启文件类型检测
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
3.安装
进入Vim,输入命令。
:PluginInstall
在Vim最下边会显示processing等文字即表示在安装。其他命令在上述配置当中的brief help中。
4.官方FAQ
官方FAQ和项目地址见这里。https://github.com/VundleVim/Vundle.vim#docs