tags:

views:

143

answers:

6

is there an autocomplete feature for vi. ctrl p 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.

A: 

Maybe this article will help, I haven't tried it to be honest but it looks suitable.

+2  A: 

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

wishi
trying supertab
iamrohitbanga
+3  A: 

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.

Brian Agnew
+1  A: 

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

postfuturist
netbeans and eclipse are powerful editors themselves. why do you need vi plugins in them.
iamrohitbanga
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: http://answers.polldaddy.com/poll/2150554/
postfuturist
+1  A: 

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

Andy
+1  A: 

I’ve already asked this and although there are some promising answers, the overall prospect is bleak. I haven’t had time to look into all of the possible ways in detail but for the moment my summary is thus:

  • There are different plugins available (see above and in other answers)
  • But none is the “killer” product
  • All require a lot of effort to get working
  • Most are unstable or achieve unsatisfactory results
  • IDEs (Eclipse, IntelliJ, Visual Studio) still have a surprisingly big advantage over Vim here, although the latter has been around much longer and could in principle deliver the same experience.

All in all, highly disappointing.

Konrad Rudolph