我的vim配置

主要是适配python开发. 都是些github star超高之作.

首先,用vundle来管理插件:

github stars: 10,272
地址: github/vundle

我的vundle list:

1
2
3
4
5
6
7
8
9
10
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
Plugin 'Valloric/YouCompleteMe'
Plugin 'tmhedberg/SimpylFold'
Plugin 'scrooloose/syntastic'
Plugin 'nvie/vim-flake8'
Plugin 'altercation/vim-colors-solarized'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}

最难折腾的:YouCompleteMe

github stars: 9,475
需要编译后才能用, 还有几个依赖要装. 在mac上还必须得装macvim, 如果自己编译过python的话, 更是无数多坑. 当初我为TA折腾了整两天… 不过很值得,最好的自动补全,几乎支持所有语言.
效果:

炒鸡简单的折叠: SimplyFold

github stars: 102
可以在vimrc里把空格热键成ZA:

1
2
" Enable folding with the spacebar
nnoremap <space> za

效果:

静态语法检查: syntastic

github star: 5,951
效果:

pep8检查: vim-flake8

github stars: 418
我是个重度pep8强迫症患者, 这绝逼是治疗我的神器…
得先装flake8第三方库:

1
pip install flake8

效果:

树状导航: nerdtree

github stars: 5,667

多tab的nerdtree支持: vim-nerdtree-tabs

有了TA, vim瞬间提高不止一个bigger…
效果:

震撼的powerline: powerline

github stars: 2,640
效果:

最后再贴上我的.vimrc, 欢迎试用.