1 plugin directory ~/.vim/bundle/ not available for self-creation
2 Installing Vundle
$ git clone https://github.com/vundlevim/vundle.vim.git ~/.vim/bundle/vundle.vim
3 Configuring Plugins
VI ~/.VIMRC
Add to:
set nocompatible "Be improved, requiredfiletype off "Required"set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/ vundle.vimcall Vundle#begin ()"Alternatively, pass a path where vundle should install plugins"Call vundle#begin (' ~/some/path/here ')"Let Vundle manage Vundle, requiredPlugin 'vundlevim/vundle.vim' "plugin on GitHub repoPlugin ' rkulla/pydiction ' Python tab Auto-complete
Plugin ' Scrooloose/nerdtree ' "can display a list of resources
Plugin ' Tomasr/molokai ' "Molokai theme"All of your Plugins must is added before the following lineCall vundle#end () "Requiredfiletype plugin indent on "Required"Brief Help":P luginlist-lists configured plugins":P lugininstall-installs plugins, append '! ' to update or just:P luginupdate":P luginsearch foo-searches for foo, append '! ' to refresh local cache":P luginclean-confirms removal of unused plugins; Append '! ' to auto-approve removal
4 Installing Plugins
Save the above configuration file and go to vim (or VI to open any file) and execute:
:P Lugininstall , the plug-ins added to the installation configuration file are automatically fetched from GitHub.
:P luginlist can view the plugins that have been installed
5 Uninstalling Plugins
Install the plug-in line comment or delete in. VIMRC, and execute the :P luginclean
Common plugins
1 NERD Tree
Function:
Install: Add Plugin 'scrooloose/nerdtree' in. VIMRC to perform :P Lugininstall
Configuration: For convenience, switch shortcut keys can be configured in. vimrc
map <F3>:nerdtreetoggle<cr>
Configure automatically turn off Vim when only Nerdtree is left:
autocmd Bufenter * if (Winnr ("$") = = 1 && exists (" B:nerdtree ") && b:nerdtree.istabtree ()) | Q | endif
Usage:
F3 (configured above)--turn on/off Nerdtree
S--Horizontal split open file (the file where the cursor is on the line)
I--Vertical direction ...
2 pydiction
Function: Python Tab key Auto-complete
Installation: Ibid.
Configuration: Add the following in. vimrc
filetype plugin on ' /home/user/.vim/bundle/pydiction/complete-dict ' = 4 "Displays the number of rows matching the result, which defaults to 8
Usage:
<Space> - accepts the current match and adds a space ctrl-y -accepts the current match but does not add a space <Enter> -- accepts the current match, And go to the next line ctrl-e --cancels the current match
3 Molokai
A more comfortable theme.
Copy the Molokai.vim to the ~/.vim/colors/ or/usr/share/vim/vim74/colors/directory
configuring in. VIMRC
syntax Enable set to_co=-set background=darkcolorscheme Molokai
Vim Plugin Management--Vundle