views:

51

answers:

1

My team has a standard Eclipse code formatter profile. I prefer to work with VIm. Is there any way I can convert this file and use it with VIm?

+1  A: 

You could probably just configure vim to run the formatter automatically when writing your files.

Formatter invocation from the commandline (google):

<path-to-eclipse>\eclipse.exe -vm <path-to-vm>\java.exe -application
org.eclipse.jdt.core.JavaCodeFormatter -verbose -config
<path-to-config-file>\org.eclipse.jdt.core.prefs
<path-to-your-source-files>\*.java

Tip: with expand("%:p") you can get the full path to your file...

I hope this helps!

akosch
Oh, this looks promising. I'm not at work today, but I'll give it a shot tomorrow. Thank you!
Sam Jones
Works beautifully! Thanks!
Sam Jones