Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Intellisense for a language in Gvim?

Tags:

vim

I'm a newbie to GVim and I use GVim on Ubuntu 10.4 OS. I'm learning Ruby now, and I want to add Intellisense for it. My question is: is it possible to add a set of API for GVIM, not only for Ruby but maybe for Perl, Java, C++...etc? Thanks,

like image 767
Chan Avatar asked Aug 06 '10 06:08

Chan


1 Answers

Strictly speaking, Intellisense is not available for (g)Vim 7+. It's a Microsoft-trademarked feature of Visual Studio.

Automatic, context-specific code completion for many languages is a feature of Vim, however. It's called Omni complete. Ruby, Perl, Java, and C++ all have plugins supporting omni completion.

Finding, installing, and optimizing plugins for all of the above languages is a fairly broad task, and likely beyond the scope of a single question. You should start with Vim's always excellent documentation at :help compl-omni. For Ruby omni completion you'll need Vim with Ruby support compiled in.

Furthermore, there are a lot of plugins for enhancing omni completion, which is usually triggered by typing Ctrl-x Ctrl-O. I personally like AcpComplPop, which allows omni completion suggestions to pop up automatically as you type without having to use the aforementioned key command. Many more language-specific plugins, enhancements, and wiki pages are available at vim.org.

like image 86
michaelmichael Avatar answered Nov 09 '22 08:11

michaelmichael