Things Have History
TextMate: the grammar every editor learned to speak

code-editors

TextMate: the grammar every editor learned to speak

Listen · 3:51

In 2005, David Heinemeier Hansson published a fifteen-minute screencast showing him build a working blog engine from scratch. The demo was for Rails, a new web framework, but viewers kept pausing to look at the editor. The syntax highlighting was clean, the snippets were flying, and the interface felt like it belonged on a Mac. Thousands of developers downloaded TextMate before they downloaded Rails.

Allan Odgaard, a Copenhagen-born programmer, had released TextMate 1.0 on 5 October 2004, after roughly five months of development. He was building on a 733MHz PowerPC G4, where a full compilation took forty-five minutes — long enough, apparently, to think carefully about what the editor actually needed to do. His diagnosis: macOS had no native code editor that treated the developer as an intelligent adult. BBEdit was solid but aging; Vim and Emacs were powerful but terminal-bound; Carbon-era editors felt stranded in 1999. Odgaard wanted something that felt like an OS X application and thought like a programmer’s tool.

The three features he insisted on shipping with 1.0 were foldings, snippets, and recordable macros. Snippets were particularly elegant: type a short trigger, hit Tab, and a template expanded — with stops the cursor could hop between, placeholder text that updated as you filled it in, and the ability to call shell scripts inline. Group enough snippets with syntax grammars and commands and you had a bundle: a portable, language-specific toolkit that could be shared, forked, and dropped into any installation. TextMate shipped without a preference window, a toolbar, or FTP integration. The bundles were the feature.

By 2006 the Ruby and Rails community had adopted TextMate so thoroughly it was the unspoken default for any conference talk filmed on a Mac. Odgaard noted that screencasts were crucial — the minimal interface hid the editor’s power deliberately, and only live demonstrations revealed it. On 8 August 2006, Apple formalised the status with its Design Award for Best Developer Tool at WWDC in San Francisco, a remarkable prize for software built by one person in a Copenhagen apartment. Odgaard accepted it while estimating that TextMate 2 was ninety percent complete. The remaining ten percent would take thirteen years to ship.

TextMate never became the dominant editor it almost was. But what it left behind proved more durable than the product. The .tmLanguage grammar format — a declarative way to describe a language’s syntax in a property list file — became an unintentional open standard. Sublime Text adopted it wholesale. Atom adopted it. Visual Studio Code, when Microsoft built it from scratch in 2015, shipped TextMate grammars as its primary syntax engine and seeded an entire extension marketplace with TextMate’s vocabulary. Odgaard had designed for a single man’s workflow on a single platform; the industry quietly rebuilt its infrastructure around his notation.

A man in Copenhagen, a sluggish G4, and forty-five-minute compile times. The editor he built to fill his own gap became the grammar every editor since has learned to speak.

Sources

Spot a mistake?

Wrong date, broken citation, a fact that doesn't hold? Tell us. It lands in an inbox a human reads and the post can be pulled or corrected.