4 min read

NEdit, and Why You Should Care

So, what do you use your computer for? Are you a writer? A programmer? Maybe you just like to write games? Well, if you do any sort of editing of text, you use some sort of text editor. Most writers tend to use something like Microsoft Word. Fair enough, but the ones who know what they are doing use TeX or LaTeX. And programmers use text editors all the time. If you know what you are about, you'll probably spend some time on a UNIX box or a Linux machine of some sort. While there, your choice of editor will usually boil down to one of three solutions: 1) Classic editors, 2) Enterprise IDEs a la Eclipse, or 3) them stinkin' default editors in the Desktop Environment your system uses (KWrite, GEdit, &c.).

I want to convince you to try your hand with an editor that is remarkably simple, and still remarkably powerful. From start to finish, this is an editor that grows with you, and has a much less steep learning curve than Vi or Emacs. Does this matter? Well, it matters if you want others to try your editor out. Still, you ask yourself, will it grow to the power I need once I am out of the newbie stage? For most editors, you can't get both. Either they are easy to use at first, and don't grow, or vice versa. NEdit does both. Not only does NEdit do both, but it has been the quintessential UNIX Text Editor for ages. It is an amazing piece of software, because it combines the power of the UNIX environment with a sleek, easy to use package that has tons of functionality in there. Just to whet your appetite:

  • Hierarchical Syntax highlighting
  • Shell interaction
  • Macro language
  • Calltips (for viewing docs on the fly)
  • Ctags support
  • Smart Indenting
  • Excellent Mouse Based Editing paradigm

If you are a big IDE guy, I want to try to convince you that a sleeker editor will make your life easier. For you CLI junkies, I want to convince you that mouse-based editing really is a good thing.

Right now, I use NEdit to program Scheme in a Literate Programming style based on noweb. This means that I have two syntax highlighting schemes in one document. One is TeX for the documentation language, and the other is Scheme code. Using hierarchical syntax highlighting I can easily get the right syntax highlighting at each level.

Not only that, I want to easily test my creations, so with NEdit's shell integration, I can run shell commands that interact with my files. I have mine set to have four menu items, so that I can build documentation, plain scheme files, scheme libraries, and scheme modules with a simple menu selection using my Makefiles. For you IDE junkies, you can integrate in NEdit with your IDEs, or you can switch over to NEdit + Xterm and see how simple life can be. You'd be surprised how little you need to be productive, and how much nicer it can be.

If I want to do my own transformations, I can write my own text manipulations in the macro language, or I can pipe my text out to a shell command. Easy as pie. Using the macro language, I can also write smart auto indentation that let's me intelligently indent my code if I want.

One of the nice things IDEs give you, and this includes Emacs, is the ability to look up the signature of a procedure without a lot of clicking around, by simply highlighting a procedure call, and hitting some keystroke or button. NEdit has full support for Calltips, which do just this. I have a calltips file which looks up the signatures for all my Scheme code, and I can load a custom calltips file for each project I am working on.

Of course, there is full Ctags support built into NEdit as well. But it doesn't get in your way or clutter up the interface. That's what's nice about NEdit, you get all this great stuff, but the interface never gets more complex than Notepad.

Now, this is something you don't find with any other editor that I know of except for Acme: efficient and effective utilization of the mouse. Sure, normal editors let you select text, cut, copy and paste, but that's only so good, and only takes you so far. Mice are faster at doing some things than the keyboard, and those of us who love our keyboards should face this fact. When the mouse is the better tool, then I am going to use it, but I want a powerful program that takes full advantage of the mouse.

NEdit doesn't just support one form of selection, but it supports line and rectangular selections, and also supports two different forms of selection at the same time: primary and secondary. It supports dragging and droping of text and has a programmable context menu. It also has the ability to do pan scrolling.

So, I can for example, select a column of text and insert it like a column of text somewhere else. I can select an area and then replace the text I just selected with some other text by doing another secondary selection. Or, I can easily exchange the two selections with just a modifier key and my mouse buttons. I can scroll with my wheel mouse, but I can also do the UNIX version of Smart Scrolling like you get on MS Windows when you press the middle button. This allows me to drag around and pan across the text window. In other words, manipulating text becomes much easier with NEdit. This is something only rivaled by the Acme edit in efficiency and productivity.

Did a mention an easy to browse help manual that is available in the editor? How about tabbed browsing, full regular expression search and replace, and a highly configurable interface?

In short, NEdit is the easier, more efficient, sleeker, and more productive editor that every programmer, writer, or author should consider. It's rock stable, and you'll be hard pressed to find an editor with as simple an interface, as efficient a paradigm, and as many features, all in one: especially on UNIX/Linux.

Try it out: www.nedit.org