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.
Maybe this article will help, I haven't tried it to be honest but it looks suitable.
Take a look at supertab: http://www.vim.org/scripts/script.php?script%5Fid=1643
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.
I use NetBeans with the jVi plugin. It gives me the editing power of vi with the intelligent auto-completion features of NetBeans.
It depends on your language. For c++, for example, there is omnicppcomplete.
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.