I’ve been using Nedit for at least 10 years as my primary text editor. It has standard features for a programmer’s text editor:
- Syntax highlighting
- Line numbering
- Brace matching
There are a few areas in which the authors put in a lot of attention to detail. It outshines every other text editor that I’ve ever used in these areas.
The Search and Replace Dialog
This search and replace dialog is to me the gold standard for search and replace functionality in a text editor. I have used every option and button in this dialog with the exception of the “Whole Word” option.
The selection of buttons at the bottom is genius. I can choose the action and context in a single click. Using “Keep Dialog” in conjunction with “Replace & Find” allows you to review each replacement one at a time.
The regular expression support is perfect. Unlike other editors (cough eclipse) it allows regular expressions to match multiple lines.
Command Line Integration
Nedit is the only Linux program that I’ve ever used that does exactly what I want when I open a file from the command line with it.
- Open first file (
nedit file1.txt) — Opens nedit with a single file in it.
- Open second file (
nedit file2.txt) — Creates a second tab within the already open nedit for the second file.
- Move to another virtual desktop, open a third file (
nedit file3.txt) — Opens a new nedit window on the new desktop with the third file in.
In short, nedit knows that it should have one instance per virtual desktop and that it should have tabs for all the files opened on that desktop. Again, perfect attention to detail that makes other text editors look completely inferior.
Nedit takes about 100 milliseconds to start up and show the editor window. I have never used a GUI program of any sort that is able to deliver that sort of startup speed. Many editors that I’ve used take seconds to open. A full development environment like eclipse may take minutes.
Usually, text selection is done line by line, but by selecting while holding down the ctrl key, nedit allows block selection. I’ve gotten so used to using it that I get frustrated when text editors don’t support it.
Nedit supports recording and playing back keystrokes. Macros can even invoke search. This makes repetitive editing tasks a breeze. Again, once I’m used to it, its frustrating to use a text editor that doesn’t have it.
Unfortunately nedit has a big problem that prevents me from using it as my only text editor: Non-support of Unicode. Nedit was written to support ONLY Latin-1 characters. This makes nedit useless on any files with non-latin-1 characters.
It is also difficult to get working with a reasonable set of fonts. To get the fonts for the menus to render nicely, I start nedit with the following command line:
LANG=en_US nedit-nc -noask -xrm "*renderTable: rt" -xrm "*rt*fontType: FONT_IS_XFT" -xrm "*rt*fontName: Sans" -xrm "*rt*fontSize: 10" I can’t figure out how to get anti-aliased fonts working in the editor pane itself. I end up using
-misc-fixed-medium-r-normal--14-110-100-100-c-70-iso8859-1 as an acceptable (but not great) font there.
An Nedit Replacement?
So is there another editor that can be as good as nedit for the features I like about nedit? I haven’t found one yet.
I use Eclipse more than I used to. It isn’t fast. Command line integration is non-existent. Regular expression support is poor. There are no macros and no block select.
I use gEdit sometimes. It is slower and clunkier than nedit but it does support unicode. Its search and replace functionality is probably its weakest comparison.
Nedit appears to be “unsupported” and “undeveloped” these days. its website is now offline. Nedit can be downloaded from sourceforge. The version of nedit that is availabe from apt on Ubuntu is now acceptable as well, so I install with
sudo apt-get install nedit