- Actions on save -> checked,
- Reformat changed lines -> checked
- Optimize imports -> checked.
This works excellently most of the time, but sometimes I want my own formatting to remain.
I seem to remember that if you do Cmd + Z immediately after save, the IDE would revert the auto code formatter and save the file (maybe from Eclipse?) But IntelliJ undoes the reformatting and marks the file as unsaved, when saving it will do the reformat again. I press Cmd + Z again, code is how I want it, Cmd + S auto format again. I failed to find a way out of this loop, unless I disable "reformat changed lines" from "actions on save". But most of the time I want that.
How can I undo the auto reformat and save the file? I don't want to use formatter markers.