I needed to do a few tweaks to .vimrc to get Java code looking smooth in vim and I'm passing the joy. This is probably good for at least 80% of Java programmers. Hope this helps my fellow Java/Vim peeps.
My .vimrc file:
"Take care of indents for Java.
"Java anonymous classes. Sometimes, you have to use them.
Also you can use
Get help on java syntax highlighting file:
, April 15, 2004 2:30
I use these settings too:
let java_minlines = 150
, April 15, 2004 6:34
Also, in cygwin, there's a program called "astyle" which properly indents Java programs, just like cb or indent do for C programs.
, March 9, 2005 15:14
Prefer using :setlocal from a java ftplugin if you do not want to pollute all types of files with Java settings.