5 ms·
I use nano when I need to edit something from CLI because I don't like ancient editors with modes or non-standard key combinations from 80s. And in nano the mos
by codedokode 4y ago
I use nano when I need to edit something from CLI because I don't like ancient editors with modes or non-standard key combinations from 80s. And in nano the most important shortcuts are at least written in the bottom of screen.
While nano supports some standard shortcuts (arrows, Ctrl + arrows, Home, End, PgUp, PgDn), others are non-standard and I don't understand why. For example, "save" is Ctrl + O instead of common Ctrl + S, exit is "Ctrl + X" instead of "Ctrl + Q", Esc doesn't work when you want to cancel search, and so on. What a nonsense. Why should someone use different shortcuts for the same function.
- klyrs 4y agoThis made me chuckle. Pico was the first non-BASIC editor I used because the public library BBS used Pine. As a descendant of Pico, I'd say that Nano is an ancient editor, and it comes with all the historical baggage fueling your complaints.
- soraminazuki 4y agoIt's not a good idea to use Ctrl + s and Ctrl + q as default keybindings for any important functionality on the terminal because terminals traditionally used them to stop/resume terminal output. Some terminal emulators still do this, so making people press those keys unwittingly would be problematic. So no, nano developers aren't being non-sensical here.
- adhesive_wombat 4y agoYep, pressing Ctrl-S in a terminal and having it freeze up is extremely confusing at the best of times. Because I often (used to) press Ctrl-S as a reflex against certain crashy software, I'd not even really recall pressing it and then I'd wonder what the hell was going on. Then again, I have saved :wq into a few text files too!
- cesarb 4y ago> Yep, pressing Ctrl-S in a terminal and having it freeze up is extremely confusing at the best of times. At least some terminals (IIRC, KDE's Konsole is one of them) show a helpful colored bar telling you that the output is paused and you should press Ctrl-Q to resume. Unfortunately, other popular terminals (like Gnome's gnome-terminal) don't have any visible indication for that.
- gnubison 4y ago‘stty -ixon’ disables this.
- gnubison 4y agoActually, ^S does save, since 2017.
- currysausage 4y agoBut you might have to put "stty -ixon" inside your .bashrc (or does nano take care of this?).
- gnubison 4y agoNano takes care of this, just like it disables line buffering (ICANON) and signal keys (ISIG).