MacDevCenter    
 Published on MacDevCenter (http://www.macdevcenter.com/)
 See this if you're having trouble printing code examples


text.editor.addicts.txt

by Giles Turnbull
11/05/2004

Look, I'm only writing this for one reason: I want to know if there are lots of other people out there who are like me. Text editor addicts.

I simply can't avoid downloading and trying out any application I see that claims to edit text. It might be from one of the best-known software houses around, or from a single guy coding when he should be sleeping; if there's an editor to try, I'll try it.

And believe me, I've tried a lot. I may even have tried 'em all.

If, as I hope, you are just like me, and you have a strange fascination with text editors too, perhaps you might like to join me as I take you on a tour, line by line, character by character, into the wonderful plain text world I've explored.

Ready?

do.txt

Let me tell you something about my father-in-law. He retired earlier this year, after a lifetime's work with computers. He can remember the days when everything was coded on punched tape.

Towards the end of his career, he worked with large networks of Unix servers and Windows client machines. But his roots were in the old days of computing, and I only understood what kind of alphageek he was when I saw him boot up a laptop. He had a text file called do.txt that opened in Windows Notepad as the machine started up.

I was peering over his shoulder, I couldn't see how long the file was, but the first pageful was certainly an impressive list of things to do.

Ask Danny O'Brien and he'll tell you that the real geeks organize themselves with text files. I'd been watching his Lifehacks project with interest and here it was, right before my eyes. My retired father-in-law was as much an alphageek as any of the alphabloggerati are, or might claim to be.

todo.work.txt

Related Reading

Mac OS X Power Hound
Teach Yourself New Tricks
By Rob Griffiths

This is how I work, too. My todo files are good old plain text files, which I make a point of keeping well edited and up to date. As Danny said, there's nothing simpler than cut and paste. If I want to start writing an article for Mac DevCenter in the middle of my todo file, I can! (Hey, guess how this one started?)

My central file, the most important one, is todo.work.txt. Almost everything related to my current work is in there in some form or another. I have to be able to edit it a dozen or more times a day, and I have to do so quickly and without any fuss.

I have a key combo--Command+Control+T--that brings up this file anytime I need it. I probably hit that combo a dozen times a day.

And look, see what I have lurking in the bottom-right corner of my desktop:

Screenshot of a DropDrawers drawer titled 'Texts!'
Screenshot of a DropDrawers drawer titled "Texts!"

Yes, it's one of those ingenious drawers, courtesy of DropDrawers, a wonderful little shareware app that comes closest to replicating the old tabbed windows you used to be able to leave docked at the bottom of the screen in OS 9. How I miss those tabbed windows.

The drawer is labelled with the word: "Texts!"--can you guess what's inside? Yes! A bunch of aliases to text files littered all over my disorganized file system. Between them, these text files comprise almost everything that's important in my working life. And quite a lot of stuff I need for home life, too. I can make the drawer open with another key combo, and select the file I need by tapping the first letter of its name and hitting Return, or just clicking on it.

Some of the things I use a text editor for:

You can see why I consider myself addicted, can't you?

My addiction brings about another odd behavioral trait: I can't stop myself from trying out new editors. Doesn't matter how weird or obscure they might be, I have to download every new text editor I hear about and, at the very least, open a few of my favorite files in it. Very, very occasionally, I like what I see. Then I start typing. Rarer still, I like how things work.

If it's OK with you (and I'm going to assume that it is, because you've read this far, and that means you're probably as interested in text editors as I am, which is fine), I'd like to show you some of the text editors I've encountered. You probably know some of them already. You probably coded a few of them.

(Before we step outside, a note. This article was written in BBEdit 7.0. I like BBEdit. I use it for all of the above, and despite my many adventures in editing while researching and writing this article, I've not been persuaded to switch to something else. I don't need to sing the praises of BBEdit, because plenty of people have done that already, and better than I could anyway. So this article is not going to include BBEdit; if you're still reading this far in, and you don't know what it is, you are clearly very keen to find out more, and you should read up on it as soon as you can.)

But come on, hold my hand. Let's go see what we can see. There's some amazing stuff out there.

choice.txt

Look! Look at this lovely screen full of editors:

Screenshot showing lots of different text editors in Expose mode Lots of different editors: which one to pick?

There are so many wonderful editors out there, so much choice in terms of feature sets and simplicity and text handling; where does one start?

I started with my needs. When I left the world of Proper Jobs and turned freelance, I was faced with the freedom to write with the software of my choice. No longer would I be told by an employer which software to use. Merely having that freedom was a delight, but exercising it was more fun. I started out with BBEdit Lite (TextWrangler, as it was), but that was when I still used OS 9 on a lime-green original iMac with only 64MB of RAM. I picked BBEdit Lite because it was free, and because it provided everything I needed at the time. (In fact, it provided a lot more--most of its features remained unused by me.)

But over time, I came to explore other options. With the purchase of a new iBook and the jump to OS X, this became more than a habit; it was almost an obsession. I'd watch sites like Jeff's OS X Apps directory, and download anything that claimed to handle text.

Over the years, I've downloaded and played with some remarkable, impressive applications. And a handful of pretty awful ones, too, but we won't dwell on those.

As I said, you probably know most of these already. Chances are, you've tried out even more apps and have some better suggestions. But if you haven't, and you'd like some ideas for more apps to try out, this list is for you.

royalty.edit

I can't review Emacs. That would be like saying I was going to interview the Queen; not because Emacs is royalty among software, but because it's been around a long time, a lot of people have a great deal of respect for it, and I barely know it.

(And don't ask me to get involved in those endless holy wars, either; partly because, in text-editor terms, I am strictly pacifist, and partly because in this particular case I'd have to stand to one side, shouting: "But I use BBEdit!" and waving a white flag.)

I can't review Vi for the same reason. If you have the faintest idea what I mean when I write "Emacs" or "Vi," you don't need me to tell you anything about them. You doubtless have your own opinions about them, and might consider joining one side or the other in the next battle.

There is room here to mention versions of each program that have been specially built for OS X. In some respects, each betrays its roots as a command line application, because it takes on new clothes with GUI menus, Apple-ized keyboard combinations, and a simpler approach to many of the more arcane features and commands. But for someone like me, who wouldn't be able to cope without these injections of user-friendliness, they're very welcome.

Emacs for OS X takes the original Emacs environment and adds some GUI extras to make innocent Mac users feel more comfortable.

Vim for OS X does exactly the same with Vi's young cousin, offering advice and pre-written .vimrc files that make using the program much easier in Panther.

Depending on your point of view, one of these is the Only Editor You'll Ever Need, and the other is not worth downloading. Or you may be ignorant in the ways of True Computing, like me, and prefer something with a shallower learning curve. In which case -- follow me! There's a lot more to discover.

smultron.edit

Smultron is fantastic. All-Cocoa, all open source, and very slick.

Consider one of the big "wow" features of the new BBEdit 8.0, unveiled to much acclaim just a few weeks ago--the Documents Drawer, which makes multiple windows a thing of the past. Well, Smultron offers that as standard and it works beautifully.

Screenshot showing Smultron with a number of open documents Smultron doing its stuff

Sling a load of texts into it, and flit from one to the other with some handy keyboard commands. Smultron remembers your window setup and, on re-launch, will bring back all of the documents you were working on. Since it's Cocoa, it does all the neat things you'd expect, like checking spelling as you type, and working with the Services menu, and generally it behave well on Panther.

I like it because it has the BBEdit feel without the price. Sure, it only has a fraction of BBEdit's features, but not everyone needs all of those features. Certainly for someone like me, wanting to work mainly with .txt and .html files and not much else, it's a delight. The added bonus of the documents drawer, which makes all that messing around in the Finder so much less of a deal, is the icing on the keyboard.

The features it does have--a huge list of syntax colors, built-in HTML preview, a detailed status bar, and a drawer for keeping often-used snippets of text--are well implemented and just plain useful.

It's also one of those rare apps with a sense of humor. In the preferences, you can tick a box marked "I hate brushed metal" to make the app more like an app, and less like something you'd plug into the stereo.

Smultron is only now at version 1.0.1, so there's still a long way for it to advance. Go grab a copy today, and send the creators an encouraging email.

nedit.edit

NEdit is probably best described as an Emacs alternative; a powerful editor designed for programming, but built as a GUI application so that (relative) newbies don't have to know everything about X11 to make it function.

It runs in the X Windows environment, and obviously has been made for use on Unix and Linux computers. It runs very happily on a Mac, under X11, and makes for a capable and flexible coding space.

Screenshot of NEdit at work There's not much NEdit can't handle

By default, NEdit looks outdated on OS X (and even on modern Linux systems, too), but it's configurable to such an extent that many of the GUI features can be spruced up and brought into the G5 era. The NEdit team have written up some helpful guidelines for users wanting to do this.

For any long-standing Unix users looking for something that will let them do programming, but free them from the tyranny of the command line, NEdit is a worthy and speedy option.

subetha.edit

No review of Mac text editors is complete without a mention of the superb and much-loved SubEthaEdit. Beloved of conference-goers, coders, and people who have to write with other people, it is special because it's unique.

No other editor is designed for the sharing of documents, in real time, across networks or over the Internet. SubEthaEdit allows people in far-flung places to have their say over the conference agenda, the seating plan, or the family holiday arrangements. Oh, and it's quite helpful if you're writing code with a bunch of other programmers, too.

Screenshot of SubEthaEdit in use SubEthaEdit lets you work with other people on the same document, in real time

SubEthaEdit has earned many loyal users because it works as described, without fuss, and with all of the grace and elegance of a much more mature application. While it has all the text-related features a programmer or writer might need, it also combines helpful collaboration features that you might never have realized you were living without.

Simply by including various ways for users to follow what their collaborators are doing (through use of color-coding of text, and following other people's selections and edits), the creators made sure that SubEthaEdit worked as a way of watching what other people were writing, as well as adding text of your own. Collaboration becomes clear. This is an outstanding editor, all the more so given the price--it costs nothing.

textforge.edit

I have something of a soft spot for TextForge, an app that started out as shareware and is now free of charge.

For quite a while, it was my best friend and my primary writing tool. It's fast and stable and has a very comfortable "feel" to it. This is almost impossible to describe to anyone who finds the attraction of text editors hard to fathom, but trust me; when using it, I was able to churn out more words, and faster. I just liked the feeling I got while typing within it.

TextForge keeps things simple
TextForge keeps things simple

It's another Cocoa app, written from the outset for OS X, and so is very nice to use. The features are few but all of them useful. It can handle any kind of text very speedily, and uses a limited selection of pre-assigned text/background color palettes, and transparency, to good effect. What it lacks is support for syntax, and this was what eventually drove me back to the loving arms of BBEdit. I was writing too many bits of HTML, editing too many Movable Type templates, to get by without some syntax to help me spot errors.

I keep it around because sometimes, when I'm feeling like I need to get a lot of words out of my system, I like to use it for creative writing, or to maintain a diary. It still brings out the productivity monster in me, and for that I remain very thankful.

textmate.edit

Typically, just as we were putting the finishing touches to this article, someone went and released a whole new text editor for us to play with, so we had little choice but to drop everything and try it out.

TextMate is the application in question, and not a shy one at that. Its makers are claiming some of BBEdit's turf, promising something just as useful for programmers and coders, but without the bloat and at a much lower price.

Certainly, TextMate is feature-rich. It includes some useful file-organizing tools, such as a documents drawer (which can be sub-divided into folders), and a visually attractive tabbed windows effect when working with multiple documents.

There's a comprehensive set of keyboard commands to absorb, too. There's a command for nearly every option in the extensive menus, although that means some of them feel a little unwieldy to the fingers - Control+Option+Command+D to show and hide the documents drawer, for example. The plentiful menu options do mean that users with smaller monitors may find some of their standard menu bar controls being masked while using TextMate.

TextMate certainly seems to be a programmer's editor, rather than a writer's editor. It thinks and acts in terms of file suffixes and code syntaxes; the writing environment is weighted heavily toward code creation and file management, both very worthy targets for such an editor to have. It's very customizable, scriptable, and offers users the chance to create a uniquely personalized editing environment to suit their needs.

Screenshot showing TextMate with  several documents open TextMate shows documents available within a project in a drawer to the left; open documents are shown in a tab bar at the top

The decison by the TextMate team to not offer a Preferences box is a controversial one. According to Macromates, this reflects the "simplicity inherent in the application", although personally, I'd find it easier to change application preferences from one central location rather than searching for them among menu options.

While some features (text snippets, text folding, pipe files through scripts without leaving TextMate, extensive automation tools, and column editing -- one of my favorites) have got people raving with delight, other oddities (lack of print support, no Preferences, GUI quirks) provoked some disappointment.

It's clear, though, that TextMate has a lot to offer and may well appeal to developers who find alternatives too expensive, bloated, or out of date. Then again, this is a young application and there are wrinkles to be ironed out. But for some people, that's all part of the fun of using a new piece of software.

final.thoughts

Giles Turnbull is a freelance writer and editor. He has been writing on and about the Internet since 1997. He has a web site at http://gilest.org.


Return to MacDevCenter.com.

Copyright © 2009 O'Reilly Media, Inc.