GNU Nano, by far my favourite text editor when using the command line, released version 8.0 recently – and by recently I mean a month ago – and in it, there’s a pretty interesting additional feature that should make using Nano a little bit more straightforward for those not used to its key combinations.
Command-line option –modernbindings (-/) makes ^Q quit, ^X cut, ^C copy, ^V paste, ^Z undo, ^Y redo, ^O open a file, ^W write a file, ^R replace, ^G find again, ^D find again backwards, ^A set the mark, ^T jump to a line, ^P show the position, and ^E execute.
↫ GNU Nano’s news page
Basically, this option makes Nano’s key bindings a bit more in line with what you might expect as someone coming from a graphical environment. Of course, Nano’s keybindings are listed at the bottom of its user interface, but it’s still nice to have the option of making them more in line with the wider computing world.
Instead of using the command-line option, you can also change the name of Nano’s executable, or a symlink to it, to start with “e”.
I like and use nano, but I don’t understand this comment: “Instead of using the command-line option, you can also change the name of Nano’s executable, or a symlink to it, to start with “e”.”
In a POSIX system, the command line options are passed to the executable, and the name of the executable is passed as the first option. So, if you name the nano executable as enano, it will see that as its name and know to enable those special options.
Another example of how this is widely used is, for example, GNU Bison is compatible with the old yacc tool, and if you name the binary yacc (or launch it from a symlink named yacc) it will know to activate the yacc-compatibility mode. i believe bash does the same when launched as sh, too.
Amazing. Thanks.
> modern keybindings
> in line with what you might expect as someone coming from a graphical environment.
That is what Tilde is for.
There is more information on:
– https://os.ghalkes.nl/tilde
– https://packages.ubuntu.com/tilde
Thanks for this, it looks good. (Not sure about the shadows, but I expect I’ll get used to them.) I’ll definitely give it a try.
Interesting. Reminds me of the old DOS-based First Choice word processor.
nice article.
These are not the standard shortcuts the users are likely to expect. Eg. typically Save is Ctrl+S.
I think most of the things that do have standards are pretty standard. But, yes, that one seems a bit odd.
Note: In Tilde (https://packages.ubuntu.com/tilde) you use Ctrl+S to save, and Shift+arrows to select text, and you have menus if you don’t remember shortcuts, etc.