Search code examples
eclipsescalascala-ide

ScalaIDE: code formatting


When I was editing my Java code, I could simply press Ctrl+Shift+F and get my code autoformatted.

Now I'm using ScalaIDE and I found out no option to format the code on-demand. I didn't even found such an option when I searched the Keys section of the preferences. Can you please show me where the option is?


Solution

  • It is same in ScalaIDE, see here. It uses Scalariform internally, where you can specify your settings(Window -> Preferences -> Scala -> Editor -> Formatter). Ctrl+Shift+F works also, check your Eclipse shortcuts again.