Vs Micro ^s ^q
Honestly that, and ^k (kill to end of line) are the only commands I use in any CLI editor.
Ironically my muscle memory actually learned the obnoxious 3-step nano way so I usually forget to use micro.
But every time I work with a developer under 40 and see them fiddling with vim trying to wrestle with vim to do simple text entry with a git commit message, I help them set $VISUAL and -$EDITOR to micro, although I have to remember the config to turn on the help/status bar that shows the commands, since they inexplicably turned it off by default a few years ago.
^s: Save
^o: Save as (type out filename, save and return to editing)
In other words, to save and quit:
^s,^x
I'm now a convert of ^S^X!
^S Save file without promptingLet's just take a moment to appreciate what is apparently more important than the happy-path activity of saving your file:
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text^T To Spell
Of these, I to this day have no idea what ^J, ^C, and ^T would even do. Who the heck tries to justify text in a plaintext editor? Lol.According to nano, the rationale of the order is:
> "The bottom two lines show the most commonly used shortcuts in the editor."
I still use ^O a lot due to heuristics of reading a file X, to use as a template for a new file Y (think nginx server block). The intent to use ^O, in those cases, actually precedes firing up nano.
* ^T requires a spell checker to be installed. I get: Error invoking "spell", even though I have aspell, gspell, hspell, huspell, hunspell and also nuspell installed. Who knows how to configure this.
* ^C outputs information about the current cursor position, but "Cur Pos" is not a helpful description.