How can I set up that the code is reformatted automatically on saving?
So I don't always have to press Ctrl + Alt + L.
Automatically formatting code in Android Studio and IntelliJInstall the Dart plugin (see Editor setup) to get automatic formatting of code in Android Studio and IntelliJ. To automatically format your code in the current source code window, use Cmd+Alt+L (on Mac) or Ctrl+Alt+L (on Windows and Linux).
Rearrange code just does the 1st point, arranges it according to android code style guidelines. Reformat code does both 1st and 2nd point. Show activity on this post. Rearranging code does more things than just reformat the code.
Tell PyCharm to clean up indentation and other code style in your file.
Actually it is possible.
The idea is to record a very simple macro that selects all the lines (Ctrl+A), formats (Ctrl+Alt+L), deselect all (Up and Down arrow) and saves a file (Ctrl+S), and bind this macro to Ctrl+S.
Free Ctrl+S changing keyboard shortcut for "Save all"
Record the macro
Assign Ctrl+S to "Format and Save"
Finally, enjoy PhpStorm!
I use Save Actions Plugin https://plugins.jetbrains.com/plugin/7642-save-actions for PhpSorm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With