转载至:http://blog.csdn.net/lydyangliu/article/details/8526152
1、vim安装
yum install vim
默认安装目录:/usr/share/vim
2、配置vim
http://blog.csdn.net/shi_869160/article/details/5925059
3、代码补全
(1)首先安装OmniCppComplete
install details
1) Unzip the plugin to ~/.vim (unix) or %HOMEPATH%\vimfiles (windows)
2) Run Vim and type the following command :(切换到用户命令,不要用root)
:helptags $HOME/.vim/doc
or
:helptags $HOME/vimfiles/doc
3) Type :h omnicppcomplete and please read the installation paragraph.
然后参考下文后面步骤
http://vim.wikia.com/wiki/C%2B%2B_code_completion
(2)安装 定制的libstdc++头文件 install details
1. unpack
2. run
$ ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ cpp_src
$ mv tags cpp # or whatever
3. In Vim:
set tags+=/my/path/to/tags/cpp
4、安装supertab
http://www.vim.org/scripts/script.php?script_id=1643
参考http://www.vim.org/scripts/script.php?script_id=2358
http://blog.163.com/023_dns/blog/static/1187273662012120114837432/
注意:配置中的目录要根据自己相应的安装目录来确定。(当然以后安装时也可以参考此目录来安装软件)