Choosing an open source text editor

For many programmers, their first “real” program was some kind of a text editor. For some, it was an exercise in a programming class, or else an exercise in creating their first real, personalized, tool that worked the way the programmer worked. Many others had to write an editor of some sort on the job, as part of some other application.

A quick search at the SourceForge open source developer resource returns over 900 programs that match the search term “text editor”.

Consider that almost every time you need to enter text into a program or web form, you are using an editor, and you can imagine just how often text editing is implemented.

Yet, with all those editors to choose from, for most who want to edit text, the choice boils down to two: Vi (pronounced “vee eye”) and Emacs. Each are actually families of functionally equivalent editors, but the Linux default implementations are VIM (Vi, IMproved) and GNU Emacs.

Both are designed for text editing, with differences. Emacs is modeless, meaning you can enter text or commands at any time; Vi uses two basic modes, one for entering text, the other for executing commands. Being modeless, Emacs is more familiar to users accustomed to more common modeless word processors like Microsoft Word; Vi’s modes can be confusing at first, but permit faster touch typing because commands don’t involve numerous multi-keystroke commands that use Alt, Ctrl, ESC and other keys (which is what you use in Emacs).

Free Software Foundation founder Richard Stallman wrote the first version of Emacs in 1976; the current stable version is 23.2 (as of 2010). Written in and incorporating Lisp, Emacs is endlessly extensible and customizable.

As a smaller program, Vi loads much faster than Emacs and is built from the ground up as a programmer’s editor, so many programmers prefer Vi for utilitarian source code editing. Emacs, on the other hand, is designed to edit any kind of text file, and combined with its built-in Lisp implementation that can mean coding source, outlining, editing documents, to-do lists, contact files, calendars and scheduling, reading email and news, even websurfing. Emacs also comes with a selection of text-based games including Tetris, Snake, even a version of the old Eliza “psychotherapy” program.

Real old-school *NIX gurus know and use both Vi and Emacs: vi for fast, simple jobs and Emacs for more complicated tasks; but for others, Emacs works better as an all-around text editor.

You can bypass the issue with one of the many GUI text editors available like Gedit, the official text editor of the GNOME desktop environment (gedit.org), Kate, the KDE Advanced Text Editor (kate.kde.org), or Java-based programmer’s editor jEdit (jedit.org).

This entry was posted in How-To, Utilities. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>