我想让vim成为我的C ++编辑器。我使用它的经验很少,需要帮助配置vim才能使用C ++。我需要这样的功能
也许你可以提供一些配置(有解释),或链接到教程,我可以使用的插件?
编辑:自2013年7月更新
我使用vim
作为我的C ++编辑器,但是我没有使用很多“异国情调”的东西。
^P
和^N
。abbreviate bptr boost::shared_ptr
abbreviate cstr const std::string &
function! IncludeGuard()
let basename = expand("%:t:r")
let includeGuard = '__' . basename . '_h__'
call append(0, "#ifndef " . includeGuard)
call append(1, "#define " . includeGuard)
call append(line("$"), "#endif /* !" . includeGuard . " */")
endfunction
.cc
到.h
切换,你可以尝试this pluginNERDTree http://www.vim.org/scripts/script.php?script_id=1658
丰富的ctags(vim本身已经支持热键)http://ctags.sourceforge.net/
taglist:http://vim-taglist.sourceforge.net/
snipmate:http://www.vim.org/scripts/script.php?script_id=2540
我不做omnicompletion只是通常^ n ^ p的东西,但谷歌有足够的资源。