I found two ways to do this:
Edit> Macros> Start Macro Recording.
Now press the semicolon and the keyboard to reformat the code (you can find the key combination from other answers or from the settings> keyboard layout).
After formatting, go to
Edit> Macros> Stop Macro Recording
Save the macro with a name (automatic format or something else). Then go to
Settings> Keymap> Macros> auto format (macro name).
Click there and select add a keyboard shortcut, then click the semicolon and click OK. Now, when you click on a semicolon, it will write a semicolon and do an automatic format.
Nafiur Rahman Khadem Nov 04 '17 at 9:33 2017-11-04 09:33
source share