目录[-]
如果不熟悉vim的,请在使用vim插件之前,请先阅读Vim学习指南, 建议通过前3个层次。以及有一个有趣的vim练习游戏http://vim-adventures.com/。
插件管理利器vim的插件原始安装容易混乱,而且管理起来,不方便。那么就渴望一个插件管理工具:pathogen
简单安装:
?| 123 | mkdir-p ~/.vim/autoload~/.vim/bundle; /curl -Sso ~/.vim/autoload/pathogen.vim /https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim | 
详细请查看:https://github.com/tpope/vim-pathogen
配置:
在vimrc文件的filetype plugin之前·「没有的就在最前面」添加:
?| 12 | call pathogen#infect()filetype plugin indent on | 

The NERD tree allows you to explore your filesystem and to open files and directories. It PResents the filesystem to you in the form of a tree which you manipulate with the keyboard and/or mouse. It also allows you to perform simple filesystem Operations.
你可以使用Git这样安装:
?| 12 | cd$HOME/.vim/bundlegit clone https://github.com/scrooloose/nerdtree.git | 
这个可以有。想快速写或者减少重复写代码,那么code snippets就是必须的,而对于vim来说,snipMate,你值得拥有。[ps:你可以在其snippets目录下找到对应语言的snippets,可以修改相应的snippets]。请到vim官网下载http://www.vim.org/scripts/script.php?script_id=2540。
tagbar如果你使用过eclipse,那么它右边有个叫做Outline函数列表,对,tagbar就是这个效果。

你可以使用Git这样安装:
?| 12 | cd$HOME/.vim/bundlegit clone https://github.com/majutsushi/tagbar.git | 
vim-multiple-cursors
这个插件具有Sublime Text的多光标编辑功能哟。
你可以使用Git这样安装:
?| 12 | cd$HOME/.vim/bundlegit clone https://github.com/terryma/vim-multiple-cursors.git | 
如果使用python的,有了它,爽歪歪。它拥有强大的提示能力。

你可以使用Git这样安装:
?| 12 | cd$HOME/.vim/bundlegit clone https://github.com/davidhalter/jedi-vim.git | 
eclim 就是 eclipse 和 vim的有机结合。它充分利用了eclipse强大的提示功能,快捷键<c-x><c-u>
按照官网安装之后,它会在.vim目录下生成eclim和plugin目录,请在bundle目录新建一个目录eclim,然后将这两个目录剪切到bundle/eclim目录中.这时它没有启动,还需要执行ECLIPSE目录中的eclimd。这个并没有列举出来。
其实还可以加一个supertab插件,但是我习惯使用tab来代替空格,实际上一个tab是4个空格。所以并没有列举出来。
你可以使用git这样安装:
?| 12 | cd$HOME/.vim/bundlegit clone https://github.com/ervandew/supertab.git | 
请到这里去下载,这个不解释,很强大,官网有很详细的解释和帮助文档,对于c/c++来说不可缺少。
vim-colorschemes保护视力,请从一个好的主题开始。那么vim-colorschemes中集成了很多的主题,个人比较爱好cobalt,不过有些主题只能在gvim中才能显示效果,而在vim中没有背景颜色等等问题。github去下载
?| 12 | cd$HOME/.vim/bundlegit clone https://github.com/upsuper/vim-colorschemes.git | 
| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 | " Uncomment the next line to makeVim moreVi-compatible" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible'changes numerous" options, so any other options should be setAFTER setting 'compatible'."setcompatiblesetnocompatible" Vim5 and later versions support syntax highlighting. Uncommenting the next" line enables syntax highlighting by default.ifhas("syntax")syntax onendif" If using a dark background within the editing area and syntax highlighting" turn on this option as well"setbackground=dark" Uncomment the following to have Vim jump to the last position when" reopening a file"if has("autocmd")" au BufReadPost * if line("'/"") > 1 && line("'/"") <= line("$") | exe "normal! g'/""| endif"endif" Uncomment the following to have Vim load indentation rules and plugins" according to the detected filetype."if has("autocmd")" filetype plugin indent on"endifcall pathogen#infect()filetype plugin indent on" The following are commented out as they cause vim to behave a lot" differently from regular Vi. They are highly recommended though.setshowcmd " Show (partial) commandinstatus line."set showmatch "Show matching brackets."set ignorecase "Do caseinsensitive matchingsetsmartcase " Do smart casematching"set incsearch "Incremental search"set autowrite "Automatically save before commands like :next and :make"set hidden "Hide buffers when they are abandonedsetmouse=a " Enable mouse usage (all modes)setnusettabstop=4setsofttabstop=4" setshiftwidth=4setexpandtab " use whitespace instead of tabsetautoindentsetsmartindentsetcindent shiftwidth=4" setautoindent shiftwidth=4setfoldmethod=indentsetbackspace=indent,eol,startsetcolorcolumn=80" === tagbar setting =======nmap <F4> :TagbarToggle<CR> " shortcutletg:tagbar_width = 20 " tagbar's width, default 20autocmd VimEnter * nested :call tagbar#autoopen(1) "automate to open tagbarletg:tagbar_left = 1 " on the left side"let g:tagbar_right = 1 "on the right sideletNERDTreeIgnore=['/.pyc', '/.pyo', '/.swp', '/~'] " ignore *.py[co], *.swp and *~" =======end==================" switch windownnoremap <c-h> <c-w>hnnoremap <c-j> <c-w>jnnoremap <c-k> <c-w>knnoremap <c-l> <c-w>l" ===== brace autocompletion =========inoremap ( ()<Esc>iinoremap [ []<Esc>iinoremap { {<CR>}<Esc>Oautocmd Syntax html,vim inoremap < <lt>><Esc>i| inoremap > <c-r>=ClosePair('>')<CR>inoremap ) <c-r>=ClosePair(')')<CR>inoremap ] <c-r>=ClosePair(']')<CR>inoremap } <c-r>=CloseBracket()<CR>inoremap " <c-r>=QuoteDelim('"')<CR>inoremap ' <c-r>=QuoteDelim("'")<CR>functionClosePair(char)ifgetline('.')[col('.') - 1] == a:charreturn"/<Right>"elsereturna:charendifendffunctionCloseBracket()ifmatch(getline(line('.') + 1), '/s*}') < 0return"/<CR>}"elsereturn"/<Esc>j0f}a"endifendffunctionQuoteDelim(char)letline = getline('.')letcol = col('.')ifline[col - 2] == "//""Inserting a quoted quotation mark into the stringreturna:charelseif line[col - 1] == a:char"Escaping out of the stringreturn"/<Right>"else"Starting a stringreturna:char.a:char."/<Esc>i"endifendf" Source a global configuration fileifavailableiffilereadable("/etc/vim/vimrc.local")source/etc/vim/vimrc.localendif | 
| 1234567891011121314 | <span></span><div></div> | 
这是我在写python nose插件nose-colorxunit时截图:

http://my.oschina.net/swuly302/blog/156784
新闻热点
疑难解答