I have to admit that I'm a sucker for programmable text editors.
My illness began back in the early 80's when I was a co-op at IBM, working on an IBM mainframe. We used XEDIT as our text editor. XEDIT had a 'macro' language, which happened to be the same 'macro' language used by the shell, REXX. Our application program was written in REXX, so once you knew how to program it, and figured out the trivial interface to writing macros for XEDIT, you could really make that sucker fly. In fact, most of the interesting GUI programs that ran on VM/CMS at the time were implemented with XEDIT as the GUI interface.
One of the first programs I bought for the first computer I bought, a PCjr, was Manfield's KEDIT, pretty much a complete clone of XEDIT, along with a pretty decent implementation of REXX. (Also had Turbo Pascal and Smalltalk/V running on that puny thing).
Fast forward a few years and I found myself in the IBM Cary Regency lab (aka "The Country Club") working on a text editor for IBM. That never saw the light of day. Except as the GUI engine behind my graphical rexx debugger RxD. My job on the editor team was to expose the functionality of the editor in REXX. You could write macros in C, but who wants to do that.
Fast forward a couple of years and while working on something where I was on AIX all the time, I spent the time to learn Emacs and even write some macros.
Fast forward a couple of years and while working on Smalltalk I found a few hook points in the ETWindow hierarchy so I could customize the basic text editor. Since the one provided was quite bare-bones. Customize it with Smalltalk, of course.
Things have never been quite the same since. I still use KEDIT to this day, for certain tasks, on Win32. But more often than that I'm in Crimson Editor. Pretty much stick to vi on Linux (my arm position when I'm couch coding doesn't lend itself to all the ctrl/alt/shift madness of Emacs). On my mac, where I spend most of my time, I use BBEDIT. And for anything half-way serious I'm usually in Eclipse.
One of the common denominators for these environments (save KEDIT) is that they aren't programmable. Or, at least, easily programmable. Nothing like writing macros in REXX, Lisp, or Smalltalk anyway.
So, I was quite excited when reading the manual for TextMate, that they have a macro programming capability built in. And the language is ... anything you want. Basically, shell scripts; so stick a #!/usr/bin/env ruby at the top of your macro and write it in ruby. They even support back-tick 'include the output of this command' in the code templating system.
I got a new toy.