开发者

How to enable intellisense in VIM (gvim)

Is there any way I can have intellisense enabled in VIM (gvi开发者_如何学Gom). I wish to use it for STL.


Forgive me for correcting you first, but IntelliSense is the name of the advanced code completion in Microsoft Visual Studio, not the general term for code completion.

To answer your question, you will probably want to use YouCompleteMe. The setup is not terribly hard with vim plugin managers, but don't forget to run the shell script that compiles the compiled component of YCM. Read the docs thoroughly, most initial problems are avoidable.


coc seems quite promising, integrates intellisense with vim (8.0 and above) and neovim


setting up ctags databases for use with omnicppcomplete

create tags for stdlibc++ and STL

$ ctags -R --c++-kinds=+p --fields=+iaS --extra=+q -f ~/.vim/tags/stdlibcpp /usr/include/c++/4.2.4/

$ ctags -R --c++-kinds=+p --fields=+iaS --extra=+q -f ~/.vim/tags/boost /usr/include/boost/

$ apt-file list libc6-dev | grep -o '/usr/include/.*h'> ~/.vim/tags/libc6-filelist
$ ctags --c++-kinds=+p --fields=+iaS --extra=+q -I__wur -I__THROW -I__nonnull+ -f ~/.vim/tags/libc6 -L ~/.vim/tags/libc6-filelist

Here are three links you should find useful:

Vim Intellisense

C++ code completion

OmniCppComplete : C/C++ omni-completion with ctags database

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜