Reputation: 245
Is there a way to automatically reformat my code when I Save All (cmd+s) on Mac RubyMine?
I tried to bind the shortcut CMD + S to both Save All and Reformat Code but that didn't do the trick.
Thank you
Upvotes: 4
Views: 1524
Reputation: 2997
You can now do this with the latest RubyMine. Go to preferences -> Tools -> Actions on Save.
Upvotes: 3
Reputation: 1568
Try recording a macro that involves reformatting your code and assigning a new keyboard shortcut to it.
Upvotes: 5
Reputation: 37627
There is not a way to reformat on save that I know of. However, you can tell RubyMine to reformat before committing by checking the appropriate checkbox in the Commit Changes dialog. Not that I would do that myself -- if someone misformatted a file and I then changed one line, I wouldn't want my commit to include all the reformatting.
Upvotes: 1