vim configuration

来源:互联网 发布:最具潜力的淘宝商品 编辑:程序博客网 时间:2024/06/05 05:23

插件管理工具:Vundle, https://github.com/VundleVim/Vundle.vim

自动补全插件YouCompleteMe, https://github.com/Valloric/YouCompleteMe

语法检查插件Syntastic, https://github.com/vim-syntastic/syntastic

基本设置(~/.vimrc)

set nu                                                                                                                                                                                                                   

set cursorline
hi CursorLine  cterm=None ctermbg=darkred ctermfg=white guibg=darkred guifg=white

" 标识多余空白字符
highlight BadWhitespace ctermbg=red guibg=darkred
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/

list vim configuration scripts in order: :scriptnames,  若打开特定类型的file,则list对应的脚本顺序

plugin设置脚本执行在~/.vimrc之前,若要覆盖plugin的配置(如tabstop), 则在以下文件添加配置(对于python文件,其他同理?),参考http://stackoverflow.com/questions/17688232/does-vim-load-plugins-after-loading-vimrc/17688716

mkdir -p ~/.vim/after/plugin

vim python.vim

set ts=4 noexpandtab                                                                                                                                                                                                     
set softtabstop=4 shiftwidth=4


 其他相关参考,http://codingpy.com/article/vim-and-python-match-in-heaven/

0 0
原创粉丝点击