How To Get Started With Linux: ne, The Nice Editor
One of the most common struggles for new users of Linux is text editing at the command line. There are a wealth of options supplied by default for most distributions, including highly customizable Emacs, the ever popular, powerful vi and the simpler, more friendly nano.
Unfortunately, for any users whose computer use began after Windows’ domination of the home computer market there are lots of things they may take for granted when using software (such as familiar shortcuts for copy and pasting), something these tools unfortunately lack. There is an alternative though: ne which stands for “nice editor”.
The main thing that makes ne nice is the use of the standard keyboard shortcuts that GUIs have been using for decades. Most users will be very familiar with these shortcuts when coming from Microsoft’s Windows operating system. This means no more getting lost when trying to find out how to add text to the file and then fighting again just to quit. The ne can be a major tool for anyone who stumbles into vi unprepared. As well as common keyboard shortcuts, ne also provides a menu system accessible by double tapping the ‘esc’ key or pressing ‘F1’. This enables a user to navigate through all of the available functions. For those who find commands are an easier way to use software, a command line can be opened by pressing ‘esc’ followed by ‘:’ — similar to vi.
Advanced Features Preserved
Simplifying the interface does not mean that ne sacrifices advanced features though. Useful tools such as the ability to search through the file for strings matching regular expressions, the ability to record and replay macros and syntax highlighting for various programing languages along with automatic bracket matching are maintained. There’s support for opening unlimited multiple files, although each appears as its own fullscreen window rather than being able to be edited side by side, as well as an unlimited undo/redo feature making mistake correction simple.
The interface is fairly minimal, devoting most of the screen to the text being edited with just a simple status bar at the bottom by default showing the line number and text column you are on. The percentage display shows how far through the file you are, and there’s also a row of letters and dashes which are a quick reference view of the various preferences that are set. A full explanation can be found in ne’s documentation. The final element of the status bar is the filename of the file you are editing with its path — handy for reference when you have multiple files open.
Installation of ne for Debian and Ubuntu Users
So if all of this sounds really good to you in terms of features for a text editor, your next question should be “how do I get it?”. For Debian and Ubuntu users it is included in the default packages, so installation is as simple as:
sudo apt-get update
sudo apt-get install ne
Installation of ne for Red Hat and CentOS Users
For Red Hat and CentOS users you’ll need to download the RPM from the developer (at the time of writing the current version was 3.0.1) and install it:
wget http://ne.di.unimi.it/ne-3.0.1-1.$(uname -i).rpm
yum install ne-3.0.1-1.$(uname -i).rpm
Once installed, ne can be invoked by simply typing:
Remember, you can use the ‘esc’ key with a double tap to bring up the menu, or ‘F1’ (though if you are using the terminal with through a GUI then the ‘F1’ key may invoke something locally instead). Alternately, you can use ‘Ctrl-q’ by default to quit. I personally think it’s worth having a good play with, as well as a read of the manual to help with the more advanced features. ne is a brilliant editor for helping beginners getting started with Linux. The only downside is that it will almost never be installed by default on systems you may use that you don’t administer (unless they also have an administrator that likes ne), so it is worth getting some familiarity with other editors.
Never miss another post. Sign up for the weekly 100TB newsletter and follow us on Facebook and Twitter.
Originally published at blog.100tb.com.