13

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?

Luca Matteis
  • 28,287
  • 19
  • 109
  • 164
  • 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 Answers2

7

It may be possible to use Eclim to achieve this. I have no idea how usable this is, though.


(source: sourceforge.net)

Glorfindel
  • 19,729
  • 13
  • 67
  • 91
Konrad Rudolph
  • 482,603
  • 120
  • 884
  • 1,141
  • 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.

idbrii
  • 9,440
  • 5
  • 50
  • 93
frank
  • 126
  • 3
  • 1
    I'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