Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable intellisense in VIM (gvim)

Tags:

Is there any way I can have intellisense enabled in VIM (gvim). I wish to use it for STL.

like image 230
blitzkriegz Avatar asked Jan 16 '11 08:01

blitzkriegz


People also ask

Can you get IntelliSense in Vim?

The auto-completion system (Intellisense) in VSCode is arguably its best feature. Lucky for us, it's been ported over to Vim!

How do I activate IntelliSense?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.)


3 Answers

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.

like image 119
Tamás Szelei Avatar answered Oct 14 '22 15:10

Tamás Szelei


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

like image 38
Rufus Avatar answered Oct 14 '22 15:10

Rufus


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

like image 35
Robert S. Barnes Avatar answered Oct 14 '22 14:10

Robert S. Barnes