How can I use an Eclipse formatter profile in VIm?
Asked Answered
G

1

9

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?

Gounod answered 20/8, 2010 at 3:39 Comment(0)
W
5

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!

Weisberg answered 26/9, 2010 at 21:9 Comment(1)
Oh, this looks promising. I'm not at work today, but I'll give it a shot tomorrow. Thank you!Gounod

© 2022 - 2024 — McMap. All rights reserved.