How can I set up that the code is reformatted automatically on saving?
So I don\'t always have to press Ctrl + Alt + L.
From v2017.2.4 CTRL + ALT + L doesn't work. Use alt + F8 instead.
alt
F8
Solution: Use: ALT + F8 to format the code.
When creating a macro as described by Luca Mastrostefano, use: alt + F8 to format and then ctrl + alt + s to save.
ctrl
s