用到的Vim插件
2011-11-18 15:59
204 查看
Plugin
ctags: 用于生成tags文件taglist: 便于快速的浏览一个大的代码文件,可以方便的在函数之间跳转。
matchit: 在配对的标签或者字符之间跳转。可以用于html的标签跳转。
autoclose: 自动输入配对的字符或者标签。
xmledit: 对于xml类型的文件,自动输入对于的标签。
pyclewn: gdb和pdb的vim潜入插件。
看起来snipMate很好用,有时间要试一下。
Customize
下面是一个我对于C的key mappings和abbreviation。""" abbreviation " helper function func Eatchar(pat) let c = nr2char(getchar(0)) return (c =~ a:pat) ? '' : c endfunc " include iabbr <silent> #i #include iabbr <silent> #d #define " #ifn is an invalid abbreviation sequence, so use imap imap <silent> #ifn #ifndef <CR>#endif<Up><C-o>:norm {1}lt;CR> imap <silent> #ifd #ifdef <CR>#endif<Up><C-o>:norm {1}lt;CR> iabbr <silent> #e #else " control statement iabbr <silent> if if ()<Left><C-R>=Eatchar('\s')<CR> iabbr <silent> while while ()<Left><C-R>=Eatchar('\s')<CR> iabbr <silent> for for (;;)<Left><Left><Left><C-R>=Eatchar('\s')<CR> iabbr <silent> switch switch ()<Left><C-R>=Eatchar('\s')<CR> """ key mappings imap // <C-o>:s/^.*$/\/\* & *\/<CR><C-o>:noh<CR> " pyclewn mappings map <F5> :Pyclewn<CR>:Cfile <C-R>=expand("%:p:h") . "/" <CR>
下面是对C++的。
""" key mappings imap // <C-o>:s/^./\/\/ &<CR> vmap <silent> \\/ :s/^./\/\/ &<CR>:noh<CR>
下面是对Python的。
" key mappings map <F5> :Pyclewn pdb <C-R>=expand("%")<CR><CR> map <F10> :Cstep
相关文章推荐
- 我的vim配置文件.vimrc以及用到的几个插件(持续更新)
- vs2015中用到的几个插件
- vi/vim使用进阶: lookupfile插件
- Vim ZenCoding 插件使用教程
- vim的.vim插件以及.vmb插件安装方法
- Android Studio 非常好用的几款插件,好用到爆
- 在Mac上使用vundle自动安装vim插件,并用vim代替sourceinsight
- 上古神器vim插件:你真的学会用NERDTree了吗?
- Vim 必备插件
- Vim 插件管理
- linux下vim插件管理 vundle
- vim学习 - 插件管理插件
- vim常用快捷键+cscope插件
- vim插件:pylint
- 使用vundle进行Vim插件管理
- vim及相关插件配置
- vim常用插件
- vim下groovy缩进插件
- vim 插件
- Intellij Idea 的 vim 插件和默认快捷键冲突解决的方法