Ruby on Rails
Ta-da List


August 06, 18:27

TextMate: The missing editor for OS X

UPDATE: TextMate has been released!

When I first arrived on the Mac with Jaguar two years ago, I was somewhat stumped by the lack of a decent editor. On Windows, I had been a big fan of UltraEdit and knew of TextPad a decent alternative. But on the Mac there was pretty much nothing of the kind.

The Predecessors
Well, that's not entirely true of course. There was BBEdit. The editor everyone was using in the good old days of the crashing Mac (or OS 9 as I'm also told it was called). So I tried to see if I might too could come to love the editor. But no. Not even a sparkle. There's was a distinct feeling of "is that it?!". It felt so much out of place alongside my Cocoa applications that it along with its immensely bloated features list just left me cold.

So for quite some time my editor needs were fulfilled by TextEdit with the TextExtras extension. For Windows users, it must sound horrible to use the built-in editor. But thankfully TextEdit is actually a somewhat decent, if very basic, editor (much unlike the atrocity that is Notepad). So I was able to handle the dispair. For a while at least.

It wasn't long before I absolutely needed some kind of project management support in TextEdit. Working on a bunch of files using just the Finder and TextEdit gets old fast. So Project Builder (now known as Xcode) turned out to be the solution. Unless you're working in Objective-C or Java, Project Builder/Xcode is just TextEdit with mediocre syntax highlighting and project management, though.

With the appearance of Subethaedit, I found an absolutely fantastic application for talking shared notes, writing collaborative school papers, and doing the odd remote pair programming. But without project management, or other advanced editor features, it didn't even come close to meeting the needs I had and have as a Ruby programmer.

It's the feeling
TextMate is the answer to all my editing prayers. There I've said it. TextMate has single-handedly rendered TextEdit and Xcode obsolete, contained Subethaedit to strictly collaborative tasks, and stopped me from feeling sorry about not liking BBEdit. Yes, it's that good.

I could babble on about all the amazing features, such as code foldings, easy macros, live-updating project management, stellar syntax highlighting (mixing Ruby with HTML in rhtml files), tabs, column mode, smart typing, or command runnings (don't leave the editor to run unit tests). But I won't. I'll instead focus on the feel of TextMate.

Many editors can exhibit a laundry list of desireable features, but it doesn't really matter unless it feels right. I doubt there's anything Emacs can do that VIM can't, but Unix people usually swear by only one of them (and often times have contempt for the other). The tactile sensation is that important. And TextMate gets it just right.

It feels like it was made for OS X. By a programmer that really, really cares about editors. And guess what, it was!

Can I see it?
I did the 10 minute presentation of Rails (22mb) using a slightly older version of TextMate. That should give a pretty good idea of how it works. But on top of that, I've also made a few smaller movies to show of individual features:

So where do I get it?
TextMate is coming out with the first public beta in September. It'll be priced like most regular shareware packages on the Mac (so none of that $179 crazyness). You can sign up for a one time posting at the MacroMates site.

Disclaimer: I know the programmer. I've been pretty heavily involved with the development process by helping to determine, prioritize, and test features. I have no financial involvement, however. All my work and hype are small tributes to the awesome archievement that is TextMate. I feel blessed to be able to help it gain traction

Challenge by Guan Yang on August 06, 21:33

Does it have the same level of encoding conversion/reinterpretation support that SubEthaEdit has?

Btw, wrt financial involvement: Do you get your copy for free? ;-)

Challenge by Luc Heinrich on August 08, 13:00

Aha! I was wondering what the hell was this weird editor you were using in the "10mn presentation", even Google was not helpful. Now it all makes sense. :)

Personnally, the number one feature I'd like to see in a modern OSX editor is easy and powerful extensibility, via plugins, or scripts, or whatever (something along the lines of JEdit plugins for example, but better). BBedit has some kind of plugin support, but all based pre-OSX antiquity crap.

I will surely try that TextMate thingy when it's available, and I really hope that it will provide some ways to extend it in some way or another.

Btw, the link to MacroMates you posted seems to be dead.

Challenge by Guan Yang on August 08, 15:03

Luc: The MacroMates site is probably just temporarily down; I signed up with my email address when David first made this posting.

Challenge by Allan Odgaard on August 13, 18:13

Sorry about that, it was a combination of a power failure, fried hardware, and everybody who could fix it, being on vacation -- it's up and running again, and hopefully for good! :)

Thanks for your patience and to everyone who did get a chance to signup before the meltdown (those who did not, can do it now)!

Challenge by Bruce on August 16, 21:28

I second the call for extensibility. What I'd really like is an excellent native XML editor that has RELAX NG-based real-time validation and tag completion a la the emacs nxml mode. It ought to be possible to do something like that with a module, perhaps based on this validator:

Challenge by Alex on August 17, 2:01

It looks like they've done the tabbed window the way I was hoping BBEdit would:

I'd love to get in on the beta cycle if they want early feedback from a someone dealing primarily with PHP/HTML/JS/CSS.

Challenge by Rich on August 19, 1:52

Looks nice... I searched for this after watching the video. I guess I'll have to try them both out!

What I'd really like is a more Mac-native Vim — i.e. quick to get around and edit, but better at doing window splits, folding, multiple documents, fonts, drag-and-drop, and so on.

I always feel so lost in “normal” text editors, being unable to jump 8 words forwards, or to the next line starting with a bracket, or to reindent the current block.

Challenge by Rich on August 19, 1:53

One more thing... if you wouldn't mind, what are the fonts you're using in the Rails video? I'm referring to the ones in iTerm and TextMate. Thanks!

Challenge by Michael on August 22, 18:15

None of the video's seem to work :(

Challenge by Nik on August 22, 18:41

I use emacs :)

Challenge by ָָָAvi Flax on August 24, 0:17

It's funny: I just wrote a blog post today saying that after a lot of searching, I finally found the OS X editor I was looking for: jEdit. I'm just doing some casual php/xhtml coding for my personal sites, but still; I'm a programmer by trade and tools are important. I tried jEdit a year or three back but it didn't seem quite ready; this time around I'm very impressed. It's free and Open Source, and seems highly extensible and configurable. After I spent a little playing with the Preferences and browsing, installing, and configuring plugins, I had a really quite nice setup. Just another option!

Challenge by Justin French on August 26, 13:11

Is TextMate primarily geared towards ruby, or will it play nicely with PHP, JS, CSS, etc?

Challenge by David Heinemeier Hansson on August 26, 13:16

It's very much a general purpose editor that'll work nicely with any programming or markup language...

Challenge by Justin French on August 27, 4:20

Great! Can't wait to ditch BBEdit (which has a lot going for it, but an equal amount against it).

Challenge by marc on August 27, 16:38

Interesting write-up, I tend to agree that I've found BBEdit to lost some of it's previous sheen, and doesn't feel that it's been updated enough, or a good fit with more OS X 'compliant' apps.

I'm primarily interested in markup support, validation etc., HTML, CSS, XML, and project and asset management (tracking, what-have-you) ... this app looks very interesting, does it have tag completion, of any kind?

skEdit is quite a nice, and rapidly improving, HTML editor, that offers tag suggestion and closing, validation, and file management, and I'm curious how TextMate might compare for web developers?

Challenge by Jon Hicks on September 01, 1:09

How does it compare to editors like skEdit though? Thats been my mainstay for over a year now. It'd have to be good to take over that!

Challenge by David Heinemeier Hansson on September 01, 12:07

skEdit is based on the default editing class in OS X called NSTextView. You get a lot for free using that, but you're also very limited in what you can do.

So column selections, foldings, macros, live templates and fast syntax highlighting is something that is very hard to archive on NSTextView.

TextMate uses its own editing class, so all of those things are possible. Once you grow accustomed to these things, it's very hard to back. It sucks you in.

The long lack of decent implementations of these features is something that has hit switchers including myself hard. Windows has TextPad and UltraEdit, which are both very capable editors. OS X has BBEdit and a bunch of NSTextView derivatives, such as skEdit, Subethaedit, and Xcode.

It's time to even the score ;)

Challenge by vitaflo on September 01, 21:04

I'm just looking for something that will color my XSLT tags differently than the HTML tags contained within them. I have yet to find an editor that can do this and do this well on Mac, and it's frustrating as all hell. Once I find one it's an instant switch for me (as long as it's a native OS X app).

It'd also be nice to allow you to color the background color of a tag as well! Similar to some of the color syntax highlighting option in Homesite on PC. I've really missed that since moving to OS X. :(

Challenge by Colin Dowell on September 07, 20:58

Hey David, tell that programmer friend of yours to make his TextMate Cathedral into a Bazaar. It's creation is the most welcome news I have ever heard for develpers on OS X.

Challenge by Colin Dowell on September 08, 0:38

Question: What sort of FTP and/or SFTP support is built in?

Challenge by Jonathan on September 08, 4:00

I'll be using BBEdit 7 for a while (I don't like 8) because transmit works with it.

Challenge by But yech on September 13, 23:46

The Mac has a history of extremely poor programming editors. Perhaps having a decent text editor built in has been a huge barrier to progress.

The movies make TextMate look quite Maclike, which would be nice. I mean, I could use one of the OS X Emacs variants, but yech.

Challenge by Sean Chou on September 14, 0:32

Thank god, at long last. When I watched the Rails demo, I was not only mesmerized by the framework, I kept wondering about the text editor and actually watched it again to get the name. As a Java programmer and scripter (Perl but digging Ruby and Groovy), I'm looking forward to a light-weight, Cocoa-based text editor that supports more complex projects.

BTW, I've never understood the attraction to BBEdit either. I've installed it and uninstalled it multiple times but have never been overly impressed. I've been using vi, which zooms, but is tough for managing large numbers of files scattered across a file system.

Challenge by Ry on September 16, 22:16

Sean, for keeping track of lots of buffers on a per project basis you should try the Sessions feature of Vim. It allows you to save your open buffers into a session file. When you want to work on that project at a later date, you start Vim and pass it the session file with the '-S' option. Now you will have all the buffers for that particular project open again.

Challenge by Richard on September 19, 3:55

Does anyone know if this editor will support LaTeX, and if so, what the syntax coloring will look like? BBEdit with the "color math strings" option turned on is my preference.

Unlike any other Cocoa editor I've used, BBEdit is extremely fast at handling large LaTeX files. Based on my experience, I'm dubious that a Cocoa editor could be anywhere near as fast as BBEdit. For example, Subethaedit is extremely slow: it typically takes it at least 30 seconds to completely soft wrap and color syntax the document that I'm working on now after opening the file, is slow rendering the characters to the screen, and it quickly turns on the fan in my power book. Opening my file with BBEdit is instantaneous, I can't possibly type fast enough to see lag time to the screen, and my fan never goes on.

Challenge by yech on September 22, 18:35

Richard, Cocoa's text system is not optimized for code editing. It's very general because it has to serve a multitude of masters. TextMate doesn't use Cocoa's text system.

Challenge by johan on September 24, 0:46

wow! What a great day, first I find info on TextMate, then I found Rails!

Now if only both of them was released... ;)

Challenge by Robert Sayre on September 26, 0:47

Yep, nxml mode is killer. Until some other editor has that feature, I'll be using Carbon Emacs.

Challenge by Pete Lasko on September 27, 18:18

Everybody has a different idea of what the "Perfect" text editor is. One guy wants LaTeX, one wants XML editing, some needs PHP auto complete, or this or that obscure emacs feature. I can understand why so many text editors pop up.

BBEdit has been able, for the most part, be all things to a lot of people, but it has sort of payed the price. As it continues down its path of adding features, and cluttering its interface, people will move to editors that do exactly what they need.

I think this app sounds really nice, and seems to have some powerful macro capabilities, which is probably the number 1 feature I use in BBEdit. I also use the HTML pallet quite a bit, as I've gotten pretty lazy with typing tags and such, though I have macros for most of the tags I use often.

Looking forward to seeing this app released.

Challenge by yech on September 28, 19:07

BBEdit doesn't have real macro capabilities. BBEdit's core editing sucks. That's part of the point. If you use editors on other platforms (or if you used Alpha on the Mac, a long time ago), you'll understand.

Challenge by Richard on September 28, 20:42

Although it doesn't have "macros" in the vein of EditPlus or Ultraedit, BBEdit is very (but not totally) controllable via Applescripts, and in some ways this is superior to macros because a single Applescript can manipulate multiple applications and files and even invoke Unix shell scripts. I've never found much use for proprietary closed box macros. And if you're not very adept creating Applescripts, BBEdit is Applescript recordable.

With LaTeX one of the most crucial capabilities of an editor is the ability to navigate through book size text files. If you're using it for scientific writing, and have hundreds of equations or theorems, you're lost without it. I have BBEdit's Marker set up to search for lines that begin with %: and then display the remainder of the text of the line -- a short description of the theorem or definition or whatever that follows -- in the pull down menu. There are other methods that other editors use to accomplish basically the same thing.

One thing missing from BBEdit is the capability of opening live the same document in two different windows. This is handier when moving large chunks of text around in a file than a split screen which gives you only two tiny views of the file, as long as performance isn't significantly compromised. Another thing I miss in BBEdit is the ability to invoke an Applescript from user definable buttons in the toolbar.

Challenge by ryan on October 01, 14:34

There is no way to sign up for a beta of this any longer? I don't see a submit button on the 'signup' page at How is anyone supposed to be notified when TextMate is ready to be released? I, like many others, can't wait to try this out. In the meantime, I'll be using skEdit.

Challenge by David Heinemeier Hansson on October 01, 14:57

You just enter your email address and press return. It'll submit the form, then ;)

Challenge by ryan on October 01, 15:14

I thought that might be the case...

A warning: my address might be in there numerous times!

Again, this program sounds great. Thanks.

Challenge by boc on October 02, 2:25

Any update on a release of any form? New PB owner who misses UltraEdit. =)

Challenge by Niraj on October 08, 20:14

That is the official web page for TextMate

Challenge by Tai Toh on October 14, 17:03

I have to agree with _Avi Flax in that jEdit is a great editor. It's extensible, fast and can be used on virtually any platform that supports Java.

It's feature rich, supporting many of the features that skEdit, BBedit, and TextMate have out-of-the-box or through its plug-in architecture (Syntax highlighting, server integration, console, folding, line-numbers, drag-and-drop tabs, project management, FTP, CVS-integration). FOr macros, it uses BeanShell scripting (similar to Java). They recently released version 4.2. Check it out.

Granted, it is certainly not as sexy as TextMate or skEdit (or any cocoa app for that matter). It's usability is good considering the multitude of features it supports and the fact that it's an opensource project.

Dave nailed it when he said,

Many editors can exhibit a laundry list of desireable features, but it doesn't really matter unless it feels right.

When it fits like a glove, it's hard to give up.

I'll be keeping an eye on TextMate.

Challenge by JRH on November 06, 2:52

Here's one option that gets better with every release. It's also multi-platform and fairly cheap.

It doesn't have CVS capability, but it does have a well-documented plug-in architecture.

Challenge by on January 04, 22:09

nice pitch... you had me at "Loud"

Challenge by john on February 14, 18:02

farita de Mikel-Angelo. Ni decidis uzi kontrau li rimedon, per kiu ni venkis jam multajn gvidistojn -- malsago kaj idiotaj demandoj. Ci tiuj kreitajoj nenion suspektas -- ili tute ne komprenas la sarkasmon. Neniam dum mia vivo mi estis tiel kontenta, tiel trankvila, tiel plena de bena paco, kiel hierau, kiam mi eksciis, ke Mikel-Angelo ne vivas plu. Ni eltiris ci tiun sciigon el nia gvidisto. Li kondukis nin tra mejloj da pentrajoj kaj skulptajoj en la vastaj koridoroj de Vatikano, tra mejloj da pentrajoj kaj skulptajoj en dudek aliaj palacoj; li montris al ni la grandan pentrajon de la Siksta Kapelo kaj freskojn, kiuj suficus por freskigi la tutan cielon, -- preskau cio estis farita de Mikel-Angelo. Ni decidis uzi kontrau li rimedon, per kiu ni venkis jam multajn gvidistojn -- malsago kaj idiotaj demandoj. Ci tiuj kreitajoj nenion suspektas -- ili tute ne komprenas la sarkasmon.

Challenge by on March 31, 22:05

In your free time, check some helpful info about... Thanks!!!

Challenge by Jen on April 18, 16:13

I disagree with you

Challenge by Alex Ezell on June 13, 0:12

I have spent the entire day looking for a Windows text editor that comes anywhere close to the quality and syntax highlighting that I see in the Ruby on Rails demo using Textmate.

I think it doesn't exist.

Challenge by Zenbee on June 14, 18:41

Alex Ezell,

Ultraedit 11 works great although the support for ruby or rails isn't quite where it has to be.

Hopefully the wordfiles get updated soon.

Challenge by idiot on June 21, 1:21

i am an idiot and i am lead by richard simmons

Challenge by poker rules on June 21, 1:31

You are invited to check some information about poker rules poker rules .

Challenge by free poker on June 21, 9:28

You are invited to take a look at some relevant information dedicated to free poker free poker .

Challenge by internet casino on June 22, 8:36

Please visit some information in the field of internet casino internet casino - Tons of interesdting stuff!!!