I find myself wanting to auto-complete things that I import in the .java file I'm editing. So for example I'm working on Test.java
, and inside I have import java.util.List;
. Can I auto-complete (Ctrl+n) the methods inside the List interface so that when I do something like List l = new ArrayList(); l.<Ctrl+n>
the methods show up?
Asked
Active
Viewed 2.1k times
13

Luca Matteis
- 29,161
- 19
- 114
- 169
-
Best of luck – you’ll probably not get any useful answer though. For reference, also have a look at the question [Autocompletion in Vim](http://stackoverflow.com/q/1115876/1968). – Konrad Rudolph Mar 25 '11 at 13:15
2 Answers
7
It may be possible to use Eclim to achieve this. I have no idea how usable this is, though.
(source: sourceforge.net)

Glorfindel
- 21,988
- 13
- 81
- 109

Konrad Rudolph
- 530,221
- 131
- 937
- 1,214
-
Eclim is also the one I found but it requires the entire Eclipse stuff. I wish there was a more standalone vim "plugin" but I guess eclim is really the only thing there is. – Luca Matteis Mar 25 '11 at 13:46
5
The javacomplete omnicompletion script seems to provide an extensive feature list. I don't know if it works with what you're asking but it does not need eclim.
There's also the Vim JDE script but it needs vim built with ruby support.
-
1I've used the javacomplete script and it works very well. It comes with a Reflection class that it uses to get completions. However, I've since switched to using eclim. (I use eclipse to debug, so I might as well use it for completions too.) – idbrii Sep 09 '11 at 20:09