Tips for using Vim as a Java IDE?

Allain Lalonde picture Allain Lalonde · Oct 31, 2008 · Viewed 148.3k times · Source

I'm addicted to Vim, it's now my de facto way of editing text files.

Being that it's mainly a text editor and not an IDE, has anyone got tricks for me to make it easier when developing Java apps?

Some questions I have:

  • How do I invoke a maven task without leaving vi?
  • Can I get code completion?
  • How's the syntax highlighting?

Anything else (other than "Don't do it!") that I should know about?

Answer

toolkit picture toolkit · Oct 31, 2008

Some tips:

  • Make sure you use vim (vi improved). Linux and some versions of UNIX symlink vi to vim.
  • You can get code completion with eclim
  • Or you can get vi functionality within Eclipse with viPlugin
  • Syntax highlighting is great with vim
  • Vim has good support for writing little macros like running ant/maven builds

Have fun :-)