Saving files in RubyMine
by Leon Miller-Out
As a new user of RubyMine, I was very disappointed to find that, unlike every other Mac program in the world, it doesn't let you save your current file by pressing Cmd-S! This is big pain point because we use tools like guard and grunt heavily. For example, I press Cmd-S in a Ruby file to tell guard to run the tests for that file. The authors of RubyMine seem to think that the editor should handle all saving, and that there's no reason for me to ever manually save a file.
I learned that some of us have discussed this with RubyMine's authors, and that other people have the same pain point. A brief conversation with the authors on Twitter confirmed that they're not interested in implement normal Cmd-S behavior.
@leonmo at the moment we have no plans to implement this, because it's more about configuring guard to rerun
— JetBrains RubyMine (@rubymine) June 15, 2015
Aside from this problem, RubyMine has a lot of cool features, and I wanted to give it try, but I couldn't live without Cmd-S, so I set out to find a workaround. Here's what I came up with:
- Add an External Tool to run the venerable Unix "touch" command, which updates the modified timestamp of a file, thereby generating a filesystem event. It should look like this:
- Assign the External Tool a keyboard shortcut.
- Assign a keyboard shortcut to the Save Document command.
- Record a macro that runs Save Document, then the "touch" External Tool. You need to use the keyboard shortcuts you assigned because Save Document does not appear in the application's menus.
- Assign Cmd-S as a keyboard shortcut for your new macro.
Yup, all that. Just to be able to save the current file at will. Pretty ridiculous, right? It's working well enough for me that I've been able to continue exploring RubyMine's other features, but I'm definitely concerned that the authors aren't interested in helping me with this.