Linux text editors: Do any make the grade?

A Windows user at Computerworld tries Linux text editors, old and new.

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.

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.

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.

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 <a href=""> and </a> 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

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.

Related:
1 2 Page 1
Page 1 of 2
Take IDG’s 2020 IT Salary Survey: You’ll provide important data and have a chance to win $500.