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?
Go to Window --> Preferences. Then select Java --> Code Style --> Formatter and click on the Import... button.
Go to the "Comments" tab, and on the bottom there's the field "Line width" to change the maximum line width for comments.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With