Right now our code editor looks like this:
There are two buttons at the bottom:
- Cancel: throws out any edits made this edit session, leaving your code in memory exactly as it was, and closes the editor.
- Save & Close: applies your edits to the code in memory and closes the editor.
These have the shortcuts ^C (control-C) and ^S (control-S) respectively. But this doesn't work well on Windows, where ^C should do Copy instead. And newbies quite reasonably think that "Save & Close" means their work has been saved to disk, which is not the case.
So after many deep and profound brain-things in my head, I think I'm going to change these to:
- Save [^S]: saves your changes to disk, same as the
save
command on the command line without an argument. If you don't have a current disk file yet, it'll ask you for a save path.
- Close [^W]: closes the editor, applying your edits to the code in memory.
This more or less matches the standard behavior of other desktop editors. On the Mac, I'll probably allow you to use command-S or control-S for Save, and similar for Close. So typity typity, then ^S ^W will be your standard habit to save and exit. Unless you're doing something dicey and you really want to try it out before saving, in which case you can just do ^W, try it out, and if you like it do a manual save
(or edit
again to use ^S).
Note that what we lose with this change is the ability to revert your changes entirely. Probably OK though since we have unlimited Undo (^Z).
The other possibility, since I'm reworking all this anyway, would be to remove the two buttons at the bottom, and instead put a proper menu bar at the top. My original intent was to keep it simple, but it should also be discoverable, and I don't much like that there are hidden shortcuts for all the editing commands (select all/cut/copy/paste/undo/redo). And if we had a proper menu bar, then I could add Revert in there, getting back the functionality we had lost. There would be the possibility (and temptation) to add other functionality too... maybe some simple refactoring tools, or code templates, etc. But I dunno... this is Mini Micro, maybe we should just keep it simple?
Any opinions on these changes are very welcome!