Is it possible in Intellij IDEA after typing \';\' or press \'Enter\' happened formatting of this string?
For instance, to:
a+b=10;
Ctrl+Shift+Enter combination (Complete Statement) also does the job and makes some more handy stuff with functions, cycles, etc.
JetBrains docs: https://www.jetbrains.com/help/idea/2016.3/completing-statements.html
Default one is Ctrl+Alt+L There is a key-mapping dialog box where you can configure/overwride all keyboard shortcuts.
Navigate File->Settings->KeyMap
I know this question is quite old but there is actually a Save Actions plugin for IntelliJ that can be configured to format the code automatically.
The formatting shortcuts in Intellij IDEA are :
In Mac it is Alt+Command+L(assuming you haven't changed any of your modifier keys or Intellij keyboard shortcuts from it's default state)
You can do this with Save Actions plugin Refer This article on how to configure the plugin.
Save Actions plugin Supports configurable, Eclipse like, save actions, including "optimize imports", "reformat code", "rearrange code", "compile file" and some quick fixes for Java like "add / remove 'this' qualifier", etc. The plugin executes the configured actions when the file is synchronised (or saved) on disk.
I prefer the hot-keys though, For Mac,
To format the code : Ctrl+Alt(Option)+L
And additionally I do,: Ctrl+Alt(Option)+O , This will remove unused imports and format the import list as well.