How do you auto-format code in Eclipse?
Go to Source | Format Document or press Ctrl+Shift+F.
All you need is to export settings from Eclipse (go to Eclipse's Preferences → Java → Code Style → Formatter and export the settings to an XML file via the Export All button.), and then open IntelliJ IDEA Settings → Code Style → Java, click Manage, and import that XML file by simply clicking Import.
On Windows and Linux : Ctrl + Shift + F
On Mac : ⌘ + ⇧ + F
(Alternatively you can press Format
in Main Menu > Source)
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