Computerworld

Linux text editors: Do any make the grade?

Our exacting editor test-drives a whopping nine Linux text editors. Which ones crossed the finish line ahead of the pack?

Linux buffs tend to scoff at one of the major reasons that Windows users like me haven't switched yet: We don't want to give up our favorite applications. With countless open-source options, plus a rising number of commercial apps for Linux, their argument goes, we can certainly find a replacement for whatever software we're running on XP or Vista.

But, Linux fans, it's not so simple.

"Replacement" applications don't always offer all the features we'd have to give up. Sometimes it takes multiple apps to fill in for a Windows-only favorite. Maybe the Linux alternative isn't as slick. Or maybe it just works differently -- which doesn't make it better or worse than its Windows counterpart, but it does mean that we have to relearn how to get things done. That's not a trivial obstacle for office workers whose time is one of their most precious commodities.

I spend a good chunk of keyboard time dealing with text in varied forms, so one of my top requirements is a robust application that can elegantly handle plain ASCII text and rudimentary HTML. That means offering functions such as macros and spell check and manipulations like "change case" or "join lines," all while treating files as plain text rather than junked-up, word-processed formats.

There are a couple of excellent, inexpensive programs that do all this in the Windows environment, including NoteTab Pro, which I've been using for several years; UltraEdit is another. Alas, neither has been ported to Linux. (UltraEdit's publishers said via e-mail that they're "actively scheduling for this for a future release" but declined to estimate when the software would be available. NoteTab's folks said the company has no plans for a port.)

In Living (and dying) with Linux in the workplace, I detailed my struggle to get NoteTab Pro up and running on Linux. As it turns out, using CrossOver Linux Professional, which is designed to run Windows applications on a Linux system, did the trick. (My error, a helpful reader explained after looking at my screenshot, was trying to use a trial version of NoteTab Pro instead of the full, paid version.)

Still, I'd prefer to find a text editor that's meant to run on Linux. After my article was posted, readers offered a slew of suggestions for replacement editors. It's taken awhile, but I've finally downloaded, installed, tested and rated nine free applications.

Since you may well have different requirements for a text editor than I do, I included scores for ease of learning and use, look and feel, content editing (spell check, search and replace and the like), simple HTML editing (adding bold, italic, links and so on) and customization (How easy is it to create macros? How powerful and flexible are they?).

Alas, of the nine programs I test-drove, only a couple seemed designed for the niche I want to fill. The good news, though, is that I found a lot of solid applications that did pieces well -- and some of those pieces may be all you need. If you're only looking for some of the functionality I require and need, say, just a lightweight text editor, or if you don't mind using a couple of apps instead of just one, there are some intriguing alternatives out there.

Page Break

From the Paleozoic era

These longtime Unix apps still have devotees (mostly from the days when not much else was available). I'm not among them.

Emacs

Emacs' tag line calls it "the extensible, customizable, self-documenting real-time display editor." Note there's nothing in there that touts "easy to use" or "intuitive" -- and with good reason. This is not an editor for those who like WYSIWYG software; nor is it one for someone who wants writing tools such as spell check.

Emacs has been around on Unix for decades, and it still has devotees who like it for programming. I can see why, based on its listing of features: "controlling subprocesses; automatic indentation of programs; viewing two or more files at once; editing formatted text; and dealing in terms of characters, words, lines, sentences, paragraphs and pages, as well as expressions and comments in several different programming languages."

However, I'd characterize the UI as actively hostile.

What if, say, I want to create a new file in Emacs? Should I really need to check a manual? There's no "new file" option under the file menu, and a stab at control-N got me the admonition:

This buffer is for notes you don't want to save and for Lisp evaluation. If you want to create a file, visit that file with C-x C-f, then enter the text in that file's own buffer.

OK, except from where I'd ended up, Ctrl-X Ctrl-F just got me a lot of angry beeps. Not an auspicious start.

Page Break

To create a file, the manual explains, "just visit it. Emacs displays '(New file)' in the echo area, but in other respects behaves as if you had visited an existing empty file. If you make any changes and save them, the file is created." Um, OK.

There are lots of built-in help within Emacs, which you access simply by hitting Ctrl-H, but that help isn't all that understandable if you're a newbie ("C-k Info-goto-emacs-key-command-node. Type a command key sequence; it takes you to the Info node for the command bound to that key.") Unless you're experienced using early-era Unix editors, I'd strongly advise reading the manual.

In short, I can see why longtime Unix and Linux users and programmers would appreciate things like integration with version control systems. And if you already know and use these commands, perhaps they seem intuitive. But this isn't an application I'd recommend for someone with modest Unix or Linux knowledge, or for people who need to write and edit documents as well as programs.

Emacs ratings (on a scale of 1 to 10):

Ease of learning and use: 1

Look and feel: 4

Content editing (spell check, search/replace, etc.): 5

Simple HTML editing (bold, line breaks, ordered lists, etc.): 5

Customization (macro power, ease of creating): 5 (lots of capabilities, but not trivial to learn and use)

Total: 20

KVIM

There are people who swear by the old, command-line vi text editor. Then there are people like me who swear at it. I used vi for years, before the days of Web mail and POP-mail clients with GUIs, to write a weekly e-mail newsletter that I sent using the Unix "elm" e-mail program. I didn't mind elm, but just loathed vi. And it's not just we word-weenie editor types who detest it; I've got an IT manager friend who works on Unix systems who dislikes it, too.

The bummer of a user experience begins with the opening screen. If I'm running the command "vi newfile.txt" to start a new file, isn't it pretty likely that I want to start writing in it? Why does it open in "command mode," requiring me to type "i" before I can start my story? Not to mention having to remember things like "j" moves the cursor down one line, or "$" takes me to the end of a line. Ugh.

If you're a serious coder, some of vi's commands probably make a lot more sense. After working with regular expressions, where ^ signifies "at the start of a line" and $ "at the end of a line," I'm willing to admit that vi's ^ and $ probably weren't simply dreamed up to be annoying. Still, there's something to be said for Ctrl-right arrow. I'm well aware that a lot of hard-core coders find vi a useful tool, as one of my ham-radio friends told me recently in extolling its usefulness for various file management tasks. But I do not.

My KDE Linux desktop came with a new, improved version of vi called KVIM. Vim is an updated version of the old vi, and KVIM is vim for the KDE environment. Unfortunately, KVIM doesn't improve the vi experience much.

This is an editor that's so nonintuitive that you'll need instructions before you can use it to type a single word. Without a doubt, KVIM is highly configurable, powerful and programmable. For example, the vim online manual shows code for changing a list of names in lastname, firstname format to firstname lastname format.

:%s/\([^,]*\), \(.*\)/\2 \1/

This isn't unique to vim; many scripting languages can use regular expressions to do this, too. For a text editor, though, a better approach is to offer an easier-to-learn interface for basic functions, and then offer more complex scripting for power tricks. Vim has the power, but comes up short on its UI.

Page Break

KVIM improves on the remote Unix vi experience, allowing the delete key to delete a character and a click of the mouse to reposition the cursor (neither of which I could do when using vi in a remote shell in the '90s). There's also a save icon, which takes the place of the [escape]:w needed in remote vi, as well as icons for cut, paste, find, find next, find previous and find/replace. I still find line wrapping to be dicey; you can see this when cutting and pasting into and out of the program.

I know vi and its derivatives have plenty of fans. In fact, one of our Web developers told me that he likes the powerful things it can do -- not knowing I was working on this story -- as he was updating a script on one of our servers. Later in the same conversation, though, as he went through a multikeystroke sequence to change a line of code, he added: "I wish I could just delete!"

My point exactly.

KVIM ratings (on a scale of 1 to 10):

Ease of learning and use: 1

Look and feel: 5

Content editing (spell check, search/replace, etc.): 5

Simple HTML editing (bold, line breaks, ordered lists, etc.): 3

Customization (macro power, ease of creating): 5.5 (10 for power but 1 for ease of creating)

Total: 19.5

Writing code the modern way

If you're primarily interested in coding and don't need a full-blown integrated development environment (IDE), there are quite a few attractive options that were developed sometime after the Beatles broke up.

Arachnophilia

Arachnophilia is a multiplatform text editor written in Java that offers a fair amount of features. It does a decent job of light HTML coding that an editor or blogger might need, including built-in buttons for bold, centering, lists and the like. It's highly customizable; it includes editing buttons on the top default tool bars and allows you to create your own options in the "right-click wizard."

Arachnophilia does not appear designed for writing and content editing, since there's no spell check, thesaurus or grammar help. There is quite a bit for coders, though, including syntax coloring, Java and C++ compilers and support for a number of file types, including CSS, XML, Java, Perl, PHP, Python and SQL. (Ruby, alas, is absent.) There's even a "code beautifier" that will autoindent your code for languages with C-like syntax.

If you do a lot of search and replace, there's a prominent tool bar just for that, which expands to offer added options such as Replace All, Count Instances and Use Regular Expressions.

It's hard to complain about something this feature-laden that's available for free, but I did have a couple of quibbles. It appeared that files could have either line numbering and syntax highlighting or word wrap, but not both, which is a bit of an issue when trying to code a text-laden HTML file.

Also, the "add link" button that comes with the package simply added a and around selected text, requiring me to move my cursor manually between the quotation marks and paste in a URL manually. I'm spoiled with my NoteTab Pro macro that automatically inserts a URL I've saved to my clipboard between the quotation marks. My attempts to create a macro in Arachnophilia with text from the clipboard always seemed to place the URL outside of the quote marks instead of between them.

In any case, while Arachnophilia didn't meet all of my particular needs, it's a fine piece of freeware that I'm sure would be useful to others with different criteria.

Arachnophilia ratings (on a scale of 1 to 10):

Ease of learning and use: 7

Look and feel: 6

Content editing (spell check, search/replace, etc.): 3

Simple HTML editing (bold, line breaks, ordered lists, etc.): 7

Customization (macro power, ease of creating): 7

Total: 30

Page Break

Bluefish

Bluefish bills itself as "an editor for experienced Web designers and programmers," but the UI is intuitive enough for anyone to begin using it right off the bat and discover additional capabilities over time. This is an appealing piece of software if you're looking for a text editor to do Web coding.

The overall impression is professional yet not intimidating, with a nice mix of text and icons. I took to the look and feel right away, to the point that I began wishing for a Bluefish Windows port.

Bluefish offers options for many common HTML tasks such as fonts, tables, forms and the like -- links, too, as soon as you realize the software uses a correct but relatively less common term "anchor" to mean a clickable link. The Anchor dialog box even offers options for JavaScript events such as OnClick and OnMouseover.

There are additional dialog boxes to create text for tasks in PHP and SQL, as well as a couple of Apache and C options, and as with many serious development editors, you can group files by project for development purposes. Search and replace is robust and supports regular expressions, as you'd expect in an application targeting developers, and customizable syntax highlighting is available for numerous languages.

I did have some quibbles. If you want documentation, you'll need to look at the separate manual files, since help doesn't appear to be incorporated into the application at all. The manual is quite extensive, though, and if you're patient, you can find what you want. For example, spell check wasn't immediately obvious to me, but after reading the manual, I discovered that you must install the separate, open-source Aspell application if you want spell check (you're on your own for Aspell installation and setup).

Macros are handled via a "custom menu," where you can create your own text strings, HTML open and close tags, or search and replace commands. Text-string creation includes dialog boxes that offer additional options. It's quite easy, for example, to come up with a macro that pauses for users to include one or more inputs.

Coming in cold, I didn't find the Edit custom menu an especially intuitive interface for creating macros, but it's reasonably clear once you step through the manual. Macro capabilities aren't quite as robust as in some other applications -- for instance, I didn't see how to use other Bluefish commands within a custom menu -- but they're pretty handy for repetitive typing.

Finally, Bluefish doesn't pretend to be an application for writing prose, and it's missing some text-manipulation commands for tasks such as changing case or joining/splitting lines.

That said, if you're looking for a text-based application to do moderate-strength Web coding, Bluefish is definitely worth a try.

Bluefish ratings (on a scale of 1 to 10):

Ease of learning and use: 7

Look and feel: 9

Content editing (spell check, search/replace, etc.): 7

Simple HTML editing (bold, line breaks, ordered lists, etc.): 9

Customization (macro power, ease of creating): 7

Total: 39

Page Break

Komodo Edit

Komodo Edit is a free version of the editing portion of ActiveState's US$295 IDE. It's got a lot of text-manipulation capabilities that a programmer would want, such as indenting, joining lines, changing case, commenting a highlighted block and -- one of my favorites -- jumping to a matching brace (I occasionally lose track of my open and close brackets when trying to create complex conditionals).

Even if you don't have the debugging and other tools of the full-blown IDE development environment, Komodo Edit 4.1 is a nice application for writing code. It's got colored syntax for a slew of options ranging from CSS and HTML to Java, Python, Perl, PHP, Ruby and more. It will suggest tagging and autocompletions based on the context of commands you are entering (using Tab or Enter accepts the choice on a drop-down menu).

You can create macros by recording keystrokes, "snippets" that can accept user input or put code before and after highlighted text, templates for new files and more. You can connect to a remote server via FTP and edit files in Komodo. And, as with an IDE, you can group files in a project.

The UI is sleek, and while all features aren't necessarily intuitive, you can start using Komodo Edit at a basic level right away, and then turn to the manual as you decide you want more customization features. In fact, Komodo Edit has just about everything I look for in an editor except spell check.

I subsequently purchased the US$295 Komodo IDE (or, more accurately, talked my boss into purchasing it for me at work) and find it a great piece of software for development work.

Komodo Edit ratings (on a scale of 1 to 10):

Ease of learning and use: 8

Look and feel: 9

Content editing (spell check, search/replace, etc.): 7

Simple HTML editing (bold, line breaks, ordered lists, etc.): 9

Customization (macro power, ease of creating): 10

Total: 43

Page Break

NEdit

NEdit seems targeted more for people writing code than for people writing and editing articles or flat HTML pages. There are no tool bars or one-click HTML coding that I could find, nor are there writer/editor options such as spell check.

NEdit does have recordable macros, which is a nice plus, as well as a fairly powerful macro-writing capability. There's also sophisticated search and replace, which makes sense for a developer's tool. I liked the Make Backup Copy and Incremental Backup options. I missed being able to get to the beginning and end of lines by hitting Home and End, which I freely admit is just a Windows convention I'm used to.

NEdit could stand to have some more functions to do simple text manipulation, however. In researching how to create a macro to join lines, I found this in a Web post:

set_cursor_pos(search("^", $cursor, "regex", "backward"))
s = $cursor
process_up()
set_cursor_pos(search("[^ \t]", $cursor, "regex"))
process_down()
select(s,$cursor)
indent = get_selection()
delete_selection()
insert_string(" ")
backward_character()
backward_character()
delete_next_character()
set_cursor_pos(search("^", $cursor, "regex"))
insert_string(indent"\n")
backward_character()

That's quite a bit larger investment of effort than clicking a command in a tool bar that says "join lines."

If you're looking for something clean and fairly powerful, NEdit is an interesting option with a number of fans among Computerworld readers. If NEdit were the only tool available to me, I think I could make it do many of the things I need. However, with so many other editors available, this isn't one I'd choose in my search for an app that elegantly handles the intersection of writing, editing and coding.

NEdit ratings (on a scale of 1 to 10):

Ease of learning and use: 6

Look and feel: 6

Content editing (spell check, search/replace, etc.): 5

Simple HTML editing (bold, line breaks, ordered lists, etc.): 5

Customization (macro power, ease of creating): 7

Total: 29

Page Break

Word processing lite

If you're looking for elegant, intuitive, lightweight text editors, there are a slew of choices for the Linux platform. Here are a couple I tried.

Gedit

Gedit appears to be a small, lightweight text editor for the Linux GNOME desktop, but its look is deceptively simple. With just a few icons in a tool bar and a row of basic menus, it seems like Notepad for Linux. Poke around some, though, and you'll find there's more to it.

I was surprised to find color-coded syntax for many different files types (markup, CSS, scripting languages, compiled languages and more), as well as robust customization, the ability to revert to a saved version of a file and spell check.

However, it was missing a few other things that I'd want in a primary editor, such as text manipulation and macros, or one-click tagging for HTML (bold or links, for example). And while the basic text look and feel was pleasing to the eye, I found the syntax colors less so, even after playing around with fonts -- especially compared to something like Komodo Edit.

If you're looking for a simple editor to bang out a memo or write a quick script or code block, this is a good application. For longer, more in-depth and demanding tasks, though, I'd look for a more robust app.

Gedit ratings (on a scale of 1 to 10):

Ease of learning and use: 8

Look and feel: 7

Content editing (spell check, search/replace, etc.): 7

Simple HTML editing (bold, line breaks, ordered lists, etc.): 5

Customization (macro power, ease of creating): 5

Total: 32

Page Break

Kate

The Kate editor came bundled with my SUSE KDE desktop, and offers a more technically robust text-editing experience than, say, WordPad on Windows XP.

Alas, my first impression was extreme annoyance with a dot that showed up where a space should be when I hit the space bar after typing a word. Perhaps this is useful for certain types of programming, but it's a major distraction when you're writing prose; it looked like there was a period in the middle of my sentence when I paused to think and look at what I was doing. I found a configuration setting in the program to "remove trailing spaces," but nothing about those blasted dots.

Eventually, I found an answer by searching through archives of a KDE mailing list: Go to the editing section of the configuration menu, and under tabulators, uncheck "show tabs." I am quite sure I never would have guessed that one!

Kate offers a lot of conventional text manipulation, such as search (including regular expression support), replace, change text case, and join or split lines, as well as spell check. However, there's no built-in support for making text bold or italic, and changing fonts requires going into a Configure Settings menu (as opposed to using a tool bar).

Kate doesn't come with HTML coding support switched on, either. An HTML plug-in is available, but it comes with no documentation. The plug-in offers some basic HTML syntax highlighting if you create a file with an .html extension, but I didn't find any easy tools for doing HTML tasks such as inserting hyperlinks or bold tags. There was a nice keyboard shortcut for inserting HTML comments, however.

You can configure Kate to run external scripts, which is handy for power users. And the built-in support for CVS (the open-source change-management software, not the pharmacy) is a plus for those working on open-source collaboration. However, I don't want to write my own scripts or shortcuts to do simple things like add <b> tags. If that functionality is in the software, I couldn't find it again, and the documentation was a bit sparse. Kate looks like a nice piece of software for the specific functions it's aimed at, but it wasn't for me.

Kate ratings (on a scale of 1 to 10):

Ease of learning and use: 5

Look and feel: 6

Content editing (spell check, search/replace, etc.): 9

Simple HTML editing (bold, line breaks, ordered lists, etc.): 3

Customization (macro power, ease of creating): 3

Total: 26

All-in-one

This turned out to be a rather slender category after one of the apps I'd tested, EditPadPro for Linux, was discontinued. Still, one worthy entry remains.

Page Break

Quanta Plus

Quanta Plus bills itself as a Web development environment, saying its goal "is to be nothing less than the best possible tool for working with tagging and scripting languages." It goes a long way toward meeting that goal.

It eases HTML coding tasks with built-in tool bars for commonly used functions (bold, alignment, links and images). Many of the tags bring up dialog boxes that allow you to enter information for things like adding tables and images to HTML documents. But Quanta also has key capabilities that writers and editors need: spell check, handy text manipulation (capitalize, join lines and so on) and sophisticated search and replace that includes support for regular expressions.

Quanta is highly customizable, even offering the ability to design your own tool bars. There are three levels of what are called "user-definable actions": text actions, tag actions and script actions.

Text actions let you store commonly used text snippets -- "by Sharon Machlis" might be one for me.

Tag actions are what the name implies, allowing you to create a macro that includes opening and closing tags around highlighted text (or right next to each other if there's no highlighted text). It's easy to alter existing tags or create new ones and add them to tool bars.

Scripts are a little more complex. As far as I could see after checking the manual, there's no way to simply record keystrokes or built a nontext, nontag macro within Quanta. Instead, "script actions" run external code. This makes it fairly easy to write a Perl script and run it on your document without leaving Quanta, but not to, say, use the application's own search and replace to store commonly used search and replace tasks.

Page Break

That's my major complaint with what's otherwise a great application, and one that can be addressed by writing a script outside the editor. Quanta is not an editor for people who want to keep their macros within a single app, or who don't like to code to get nondevelopment work done.

My other quibble with Quanta is that after I tagged something and decided I want to remove the tags, "undo" (Ctrl-Z) didn't simply remove the tags, but also deleted all the text within my tags. Occasionally, it even erased additional text.

Still, this is one of the better available text editors for Linux addressing the intersection of writing, content editing and light coding. Some more in-application macro writing and better "undo" for tagging would make this an ideal replacement on Linux for my beloved NoteTab Pro.

Quanta Plus ratings (on a scale of 1 to 10):

Ease of learning and use: 8

Look and feel: 9

Content editing (spell check, search/replace, etc.): 9

Simple HTML editing (bold, line breaks, ordered lists, etc.): 10

Customization (macro power, ease of creating): 6

Total: 42

The bottom line

So, did I find the single killer text editor I'd been seeking? No, but I uncovered several good applications that should meet the requirements of users with different needs. If I switch to Linux full time, I'm confident I could stitch together a couple of separate apps that would largely do what I need.

But I bet I'll be even happier once that planned UltraEdit version for Linux is released.