4

Is there an autocomplete feature for Vi? ctrlp looks for keywords already used in the document. But suppose I want a.funcname to automatically show members of object a. Is it possible with Vi?

0

5 Answers 5

5

YouCompleteMe. It’s a plugin that offers extremely fast, fully syntax-aware auto-completion. It furthermore shows code errors on the fly (by putting a marker inside the margin next to the offending line).

So far, C++, C# and Python are natively supported. However, the plugin has an easily accessible API to add support for more languages.

There are other plugins but with the exception of Jedi (for Python only) nothing comes even close to working properly.

Sign up to request clarification or add additional context in comments.

Comments

3

Take a look at supertab: http://www.vim.org/scripts/script.php?script_id=1643

Comments

3

I realise this isn't quite answering your question, but have you looked at running vi within an IDE ?

viPlugin works with Eclipse and is a pretty good vi emulation. Since it runs within Eclipse you get all the code completion that Eclipse provides. Eclipse isn't just for Java, btw. It works with a variety of languages and may well cater for what you need.

This is the direction I took when I reluctantly realised that vi by itself wasn't providing as much help as I needed when developing, but I was reluctant to give up the power of the editor.

Comments

2

I use NetBeans with the jVi plugin. It gives me the editing power of vi with the intelligent auto-completion features of NetBeans.

2 Comments

netbeans and eclipse are powerful editors themselves. why do you need vi plugins in them.
Honestly, its a different type of power. IDE's have powerful capabilities, like scanning a project and providing intelligent auto-completion, syntax highlighting, etc. Vi-style editing provides power at a low-level, pure text editing way. With the jVi plugin, you lose none of the underlying power of the IDE, so you get the best of both worlds. It's a win-win. Vi/vim is still very popular: answers.polldaddy.com/poll/2150554
1

It depends on your language. For c++, for example, there is omnicppcomplete.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.