Add Plugins
With Plugins, you can use Vim more efficiently. But you'd better be proficient with Vim before adding any plugins.
There are many ways to add plugins, but it would be hard to manage plugins. To solve this problem, the plugin manager Vundle will be helpful.
Vundle Set-Up
$ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
Configure Plugins
Put this at the top of your .vimrc
to use Vundle. Remove plugins you don't need, they are for illustration purposes.
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
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'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
" 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/'}
" Avoid a name conflict with L9
Plugin 'user/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
" Put your non-Plugin stuff after this line
Brief Instructions
: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:h vundle
for more details or wiki for FAQ
You may see some people use
BundleXxxx
instead ofPluginXxxx
. They are nearly the same butPluginXxxx
is recommended since 2014.BundleXxxx
still can be used only for compatibility reasons.
So what do you think of it? Do I miss something? Leave your comments below...
comments powered by Disqus