Tuesday, October 15, 2013

Another Contender in the Editor Wars: ne

Talk to most geeks and they will have some sort of answer for the question "What is the best editor for the command line?" For many, it will be either emacs or vi. Those two choices, in my opinion, are a Coke vs. Pepsi sort of debate that will never be resolved. Others will respond with nano. What about those of us who just want to get stuff done with a minimum of fuss? For myself and others, I humbly submit ne, the nice editor.


Why choose ne over another editor? Simply put, because it just works. ne was written and is maintained by Sebastiano Vigna, a professor at the University of Milan. It is a POSIX standard-based editor whose aim is to be simple and not require techno-wizardry to use. Licensed under the GPL it is Free Software. The sources are designed to compile just about anywhere--I have successfully compiled it under the Haiku operating system with a minimum of fuss, for example. Users whose muscle memory has been trained by Windows will appreciate that Ctrl+C performs a copy, Ctrl+X is for cut, and Ctrl+Q quits the program. It is small and works very well over ssh connections like its terminal-based brethren. Niceties like unlimited undo and syntax highlighting for programming languages are also available. It's also a quick download and install.

All this ease-of-use does not imply that it is only for beginners or is not configurable. All key commands can be changed by editing a text file. There is a macro-recording feature for repeated tasks. Searches can be performed via regular expression. Even the menus can be tweaked. The advantage that ne has is that there are sensible defaults for regular people.

While a great editor, it is not without its quirks. Opening the menu is performed by pressing the Escape key twice. This is because of a system-level technical issue which makes it difficult to properly interpret if just pressed once. If you should call ne via sudo before having opened it as your regular user account, it will create its settings directory in your home folder as usual, but it will have root ownership. Oops. Also, selections are a bit strange if you are used to GUI text editors: you must press Ctrl+B to mark the starting point for the selection and then Ctrl+C for a copy. A bit odd, but at least not ridiculous compared to the inane, seemingly-arbitrary ways of working that vi and emacs users both consider 'normal'. Much to my own relief -- and probably that of others, as well -- the list of oddities is relatively short.

Interested in giving ne a try? Debian-based Linux distributions like Ubuntu can install it through the regular software manager (Synaptic, apt-get, etc.) by installing the ne package. RPM-based distributions such as OpenSUSE and Fedora can download from the ne website. For the little time you would need to put into it, you may well be surprised by what flexibility and usability it can afford you. As for me, I'm off to relegate nano to the trash can.

No comments:

Post a Comment

Reasons for Distrust: Yahoo, Microsoft, Apple, FBI / NSA

It is common for a network or server administrator to talk about 'reducing the attack surface.' To use a house metaphor, it's ha...