It seems to be a common opinion among experienced Unixers that Nano is a low-featured text editor meant for newbies and not suitable for advanced users. Vim and Emacs are the usual alternatives advocated. I don't know enough about Vim or Emacs to criticize them, but I do know that Nano is much powerful than a lot of its critics think.

One of the biggest points I want to make is that even though Vim has some features I'd certainly like to have in Nano (number + navigation key to move a number of units), I think Nano makes up for it by having the most common functions be significantly faster to access than in Vim. (Of course, this part of the comparison is somewhat moot because in either editor these can be customized, but having good defaults still matters.)

Example: how do you save your file?

Nano: ctrl-s. Two keypresses that don't even have to be strictly in sequence. One just needs to start before the other. It's barely slower than one keypress.

Vim: esc, shift-colon, w, enter. Five keypresses. And the first one is an out-of-the-way key that you don't already have your finger next to! (At least on a qwerty keyboard.) And you also better not still be holding down shift when your finger hits w or it won't work.

This one may have more value to me than it does in general since I've developed a habit of impulsively saving the buffer every time I've made a change and aren't immediately sure what to type next, but I don't imagine I'm the only one with some degree of save-happiness.

Example: how do you open a new file in the current editor instance?

Nano: ctrl-r. (With the default configuration you'll have to follow it with alt-f or it'll get read into the current buffer, but really what are you doing with your life if you didn't set the config option to fix that.)

Vim: esc, shift-colon, o, space.

You see where I'm going. My biggest gripe with Vim in general is the separation of "insert mode" which equates to having to press Esc and i all the time to switch between command mode and insert mode instead of putting to use the modifier keys all over your keyboard.

I'd probably sooner be persuaded to join the Church of Emacs, so I admit it's a bit unfair for me to be basing my case for Nano on a critique of Vim when I know even less about Emacs than I do about Vim. (I did try Emacs for a while and had some bad experiences with it, though I don't remember enough to explain.)

Notable features Nano has that you might not know about (besides the help enabled by default which is wonderful for letting you learn the most useful hotkeys while working) include

Of course, Nano is missing some features I'd like to have, besides Vim's number-movement shortcuts.

But none of those features are all that important (besides, I guess, bracket highlighting).

It also brings me to another great thing about Nano: its active development! Nano gets a new release every few months tops, and each one has great new features to bring to the table. The developer is mostly one guy by the looks of things but he's very responsive; he's never been slower than 48 hours. I remember when I first became a hardcore fan of Nano it was version 2.9 and some of the features I mentioned up there didn't exist. So I expect the few inadequacies of Nano to be improved in the next year or so, and if I have time I intend to help make it happen.

This page was last modified (UTC)