How enable auto-format code for Intellij IDEA?

format, intellij-idea, reformat

Solution

The formatting shortcuts in Intellij IDEA are :

- For Windows : Ctrl + Alt + L

- For Ubuntu : Ctrl + Alt + Windows + L

- For Mac : ⌥ (Option) + ⌘ (Command) + L

Problem

Is it possible in `Intellij IDEA` after typing `;` or at any event formatting of this string happens automatically? For instance, to: ``` a+b=10; ``` after: ``` a + b = 10; ``` Or only possible option: Code > Reformat Code...? Thank you!

Original source

Related problems