20、自动括号补全
推荐等级:★★★★☆
vimrc中配置如下:
"自动补全单引号,双引号等 Bundle 'Raimondi/delimitMate' " for Python docstring ",优化输入 au FileType python let b:delimitMate_nesting_quotes = ['"']
21、代码对齐
推荐等级:★★★★★
vimrc中配置如下:
"for code alignment Bundle 'godlygeek/tabular' " \bb 按=号对齐代码 [Tabular插件] nmap <leader>bb :Tab /=<CR> " \bn 自定义对齐 [Tabular插件] nmap <leader>bn :Tab /
22、静态代码分析
推荐等级:★★★★☆
syntastic是一款支持多语言的实时语法检查插件。在 syntastic 的作用下,编码中、编译前,所有语法错误都将被抓出来并 呈现给你。
vimrc中配置如下:
" 使用pyflakes,速度比pylint快 Bundle 'scrooloose/syntastic' let g:syntastic_error_symbol = '✗' "set error or warning signs let g:syntastic_warning_symbol = '⚠' let g:syntastic_check_on_open=1 let g:syntastic_enable_highlighting = 0 "let g:syntastic_python_checker="flake8,pyflakes,pep8,pylint" let g:syntastic_python_checkers=['pyflakes'] "highlight SyntasticErrorSign guifg=white guibg=black let g:syntastic_cpp_include_dirs = ['/usr/include/'] let g:syntastic_cpp_remove_include_errors = 1 let g:syntastic_cpp_check_header = 1 let g:syntastic_cpp_compiler = 'clang++' let g:syntastic_cpp_compiler_options = '-std=c++11 -stdlib=libstdc++' let g:syntastic_enable_balloons = 1 "whether to show balloons
23、快速跳转到TODO列表
推荐等级:★★★★☆
查看并快速跳转到代码中的TODO列表。重构代码时一般通读,标记修改位置,非常实用
vimrc中配置如下:
Bundle 'vim-scripts/TaskList.vim' map <leader>td <Plug>TaskList
24、维基百科
推荐等级:★★★★☆
vim下的维基百科,我的博客就是用vimwiki写的。
vimrc中配置如下:
Bundle 'vim-scripts/vimwiki'
let g:vimwiki_w32_dir_enc = 'utf-8' " 设置编码
let g:vimwiki_use_mouse = 1 " 使用鼠标映射
let g:vimwiki_valid_html_tags = 'a,img,b,i,s,u,sub,sup,br,hr,div,del,code,red,center,left,right,h1,h2,h3,h4,h5,h6,pre,script,style'
" 声明可以在wiki里面使用的HTML标签
" 对中文用户来说,我们并不怎么需要驼峰英文成为维基词条
let g:vimwiki_camel_case = 0
let blog = {}
if g:isWIN
if g:atCompany
let blog.path = 'D:/Files/Files/mysite/wiki/'
let blog.path_html = 'D:/Files/Files/mysite/html/'
let blog.template_path = 'D:/Files/Files/mysite/templates/'
let blog.nested_syntaxes = {'python': 'python', 'c++': 'cpp'}
else
let blog.path = 'D:/Files/mysite/wiki/'
let blog.path_html = 'D:/Files/mysite/html/'
let blog.template_path = 'D:/Files/mysite/templates/'
let blog.nested_syntaxes = {'python': 'python', 'c++': 'cpp'}
endif
else
let blog.path = '~/mysite/wiki/'
let blog.path_html = '~/mysite/html/'
let blog.template_path = '~/mysite/templates/'
endif
let blog.template_default = 'site'
let blog.template_ext = '.html'
let blog.auto_export = 1
let g:vimwiki_list = [blog]
25、多光标批量操作
插件:terryma/vim-multiple-cursors
推荐等级:★★★☆☆
vimrc中配置如下:
"for mutil cursor Bundle 'terryma/vim-multiple-cursors' let g:multi_cursor_use_default_mapping=0 " Default mapping let g:multi_cursor_next_key='<C-m>' let g:multi_cursor_prev_key='<C-p>' let g:multi_cursor_skip_key='<C-x>' let g:multi_cursor_quit_key='<Esc>'
26、python语法高亮
"python syntax highlight Bundle 'hdima/python-syntax' let python_highlight_all = 1
27、其他说明
在我的vimrc中使用了ctags,需要安装
sudo apt-get install ctags
