[英]Configuring Vim for C++
我想讓vim成為我的C ++編輯器。 我使用它的經驗很少,需要幫助配置vim才能使用C ++。 我需要這樣的功能
也許你可以提供一些配置(有解釋),或鏈接到教程,我可以使用的插件?
編輯:自2013年7月更新
我正在使用vim
作為我的C ++編輯器,但是我沒有使用很多“異國情調”的東西。
^P
和^N
我有一堆用戶定義的縮寫用於我的C ++使用,例如:
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
我真的不能沒有的唯一插件是Command-T (需要ruby支持)
.cc
到.h
切換,你可以嘗試這個插件 NERDTree http://www.vim.org/scripts/script.php?script_id=1658
豐富的ctags(vim本身已經支持熱鍵) http://ctags.sourceforge.net/
標簽列表: http : //vim-taglist.sourceforge.net/
snipmate: http : //www.vim.org/scripts/script.php? script_id = 2540
我不做omnicompletion只是通常^ n ^ p的東西,但谷歌有足夠的資源。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.