个人Vim的插件和配置

配置

1. 竖线

为了统一python代码规范,一行最多130个字符,则需要在最大列处显示一竖线

:hi ColorColumn ctermbg=lightgreen
autocmd FileType python,c,cpp set cc=131

2. 自动补全括号

inoremap ' ''<ESC>i
inoremap " ""<ESC>i
inoremap ( ()<ESC>i
inoremap [ []<ESC>i
inoremap { {}<ESC>i

 

插件

1. VundleVim/Vundle.vim

插件管理工具

#TODO

2. yggdroot/indentline

显示缩进

vundle安装

let g:indentLine_char = '¦'
let g:indentLine_first_char = '¦'
let g:indentLine_showFirstIndentLevel = 0
let g:indentLine_color_term = 239
let g:indentLine_color_gui = '#A4E57E'

 3. ctags

生成缓存

map <F8> :!cd ~ && ctags -R --languages=python,c++,java --python-kinds=-i .<CR>
set tags+=~/tags

其中“--python-kinds=-i”表示忽略python代码中的引用(import)。

posted @ 2018-01-18 15:47  yellowzp  阅读(459)  评论(0编辑  收藏  举报