tags:

views:

83

answers:

2

Hi everyone, 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,

+3  A: 

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.

michaelmichael
Thanks a lot for your clear explanation. I think I was lazy ^_^ since the day I've switched back to Windows.
Chan
Hi Micheal, I checked out your AcpComplPop at http://www.vim.org/scripts/script.php?script_id=1879I just want to ask you, what is <your runtime directory> in the installation guide?
Chan
A: 

Hi Micheal again,

I followed this tip http://www.vim.org/scripts/script.php?script_id=1662. I added the rubycomplete.vim into my folder named "/usr/share/vim/vim72/autoload". However, when I restarted gvim or vim, the auto-complete only works for the word already exists( I often use Ctrl-P ). No other suggestion for Ruby keywords :( ! Could you give me a hint where I did wrong?

Thanks,

Chan