28 April 2008
John Muchow of Mac Developer Tips recently posted a screencast showing a neat way to debug your Ruby code.
Speaking of the Ruby bundle, Ciarán Walsh has a post about the design philosophy behind the mnemonics of the Ruby bundle and a few highlights.
And while there seems to be a preference for writing TextMate commands in Ruby, anything that you can run from a terminal (shell) can be used. A step-by-step tutorial about how to write TextMate commands in PHP is available at Ciarán’s blog. I pushed him to write this one, as I believe there are a lot of people who work with PHP in TextMate that never got around to writing custom commands in the false belief that they would have to learn elisp or some similarly obscure language :)
4 March 2008
Not so long ago Jonathan Ragan-Kelley mentioned ExpanDrive on the mailing list and I assume it is the same Jonathan R. quoted on their page as saying:
I’ve never seen TextMate work well on a network drive. With
ExpanDrive, it’s a dream. And the drives stay mounted perfectly
when I move my laptop between home and work.
John Gruber just posted a review about ExpanDrive in which he writes:
My first impression after reading ExpanDrive’s promotional
description last week was that it sounded too good to be true. One
week later, I’m pretty sure it actually is that good.
If it wasn’t clear from the above, ExpanDrive lets you mount remote sftp drives and it actually works! I.e. no long delays or dropped connection in the middle of a save. Their introductory price is $29.
2008-03-11: Update: There is a $5 discount for the first 100 who use UWQ0OUQZWIB1ZMTP as coupon code.
29 February 2008

Ian Baird recently released Changes which is an application to show differences between two folders and merge these intelligently.
I know this is not an uncommon task among many TextMate users, as I have received quite a lot of requests for building such functionality — Changes of course has TextMate integration, so this application will hopefully satisfy a lot of you.
Version 1.0 of Changes is available for $39.95 (free trial) but if you use TEXTMATE0308 as coupon code you can get it for $29.95 (offer lasts throughout March 2008).
20 February 2008
You may have read that a lot of prominent people have recently moved to Git and are loving it. I too am one of those who fancy this new kid on the block but never got very far with the bundle I started for it.
Fortunately Tim Harper recently picked up on my initial efforts and has done a great job at not only making this bundle functional but also downright impressive :)
The much improved Git bundle can be found at Gitorious and discussion about it can be directed to its Google Group.
For those too lazy to click the link above, here are the short install instructions:
mkdir -p /Library/Application\ Support/TextMate/Bundles
cd !$
git clone git://gitorious.org/git-tmbundle/mainline.git Git.tmbundle
osascript -e 'tell app "TextMate" to reload bundles'
After having installed it you can press ⌃⌘T in TextMate and enter git to find the “Administration → Update Git Bundle” action. Use this to update the bundle (it will automatically reload after having performed the update).
12 February 2008

If your usage of Mac OS X is the slightest bit “technical” then you should do yourself the favor of getting familiar with the extremely powerful shell environment.
Even if you already know a dozen scripting languages far more expressive than the shell, there are still contexts in which the shell is just better suited for the job, and understanding the POSIX environment is knowledge that is very valuable even outside the shell.
James Edward Gray has a review of From Bash to Z Shell which sounds like just the book you want to pick up, quoting from his review:
I’ve already noticed dramatic differences. I’m using shell loops at the command-line now to process many files at once; I actually understand shell quoting and when to use which types of quotes and escapes to get the desired effect; I can easily strip off a file extension or get a directory name from a full path when I need one; I make constant use of the command history now whether I’m searching for a past command, correcting a typo, or just pulling a single argument out of a previous command for reuse in a new command; and I’ve written a few shell functions to provide shortcuts to my common tasks.
7 December 2007
Luke Daley took initiative to have FishEye index the TextMate Bundles repository.
A neat thing about FishEye (in addition to the “lines of code”-graph shown below) is that it allows per-folder RSS feeds.

Read the rest of the post »
4 December 2007
The other day Abhi Beckert asked (on IRC) how to ensure right-aligned text in a snippet. That is, after the snippet has been first inserted, it reads:
# --------------------
# Header
# --------------------
Here Header is a placeholder which we can overtype. When we fill in the actual header name (for example Configuration) the text should be formatted like:
# --------------------
# Configuration
# --------------------
The trick to solving this problem is by using conditional insertions in the replacement string.
Read the rest of the post »
29 November 2007

Seems the infamous Logitech Control Center is back to wreak havoc.
They released a 2.4 update on the 20th of November and a week later a “mate error” thread surfaced on the mailing list, I have received a dozen support emails about the problem, and if you look at the comments for LCC at VersionTracker or MacUpdate, you’ll find that a lot of users are reporting problems with this update.
So my advice: uninstall LCC. And on a more general note, if something has worked fine for a year, and it suddenly breaks, consider what you did to alter your system in the last week before you write support, thanks! :)
15 November 2007
I indirectly plugged Ciarán Walsh’s blog in a previous post about hacking TextMate. Though it is worth mentioning it again, especially the TextMate tips category.
Ale Muñoz (maintainer of the ActionScript bundle) runs a blog that has a Flash / ActionScript / TextMate focus, I haven’t linked to it before, so I hereby am making up for that.
Lastly let me send some link love to Thomas Aylott’s projects: his blog, post about his Leopard theme for TextMate, and BundleForge.
11 November 2007
This post is meant to clarify a few Leopard related issues.
Read the rest of the post »
28 October 2007
Open in TextMate allows you to open the current folder or selection from Finder as a TextMate project. There are a few scripts for this, but this one is the latest iteration and it comes with a nice icon that fits will into the Finder tool bar.
Henrik also provides tool bar items for Open in Terminal and Glob Select which are definitely also worth checking out!
And for the records, this is not related to “Edit in TextMate”
26 October 2007
Contrary to most rumors, input managers still work on Leopard (at least on my pre-GM seed), but for an input manager to be loaded there are now a few requirements it needs to fulfill.
Read the rest of the post »
15 October 2007
To enable the functionality offered for a given file type, it is important that TextMate actually detects it.
In this post I will go through the 3 steps used to detect your file’s type and then answer the question of how to make TextMate automatically recognize rspec files (for those who have bound .rb to Ruby on Rails).
Read the rest of the post »
12 October 2007
Hans-Jörg Bibiko decided he couldn’t wait for a real scripting API (i.e. allowing you to remote control TextMate) and wrote TMTOOLS, a shell command that works as a mini interpreter where the commands are all TextMate actions.
You can find the help file for TMTOOLS here and his latest mailing list letter about TMTOOLS here.
Speaking of hacking, Ciarán Walsh (maintainer of the PHP and SQL bundles, and contributor extraordinaire) recently started a blog with several TM hacks, for example to make the project drawer show Finder labels or Subversion status.
Also on his blog is a glyph input manager which add the functionality mentioned in the multi-stroke key bindings post but which does not require you to remember the arcane multi-stroke key bindings (Leopard users have a look at the release notes).
On his site, but not on his blog, is also a ReMate plug-in to disable the auto-updating of the project drawer (the feature that drives people working over network connections insane). Another approach to this problem is by Rob McBroom who recently announced a Remote Project bundle on the mailing list.
Disclaimer: With the exception of Rob’s bundle, the above is all based on undocumented functionality or using things in ways they were not supposed to be used, i.e. end user innovation.
2 October 2007
In August, while visiting the states, I met up with John Joseph Bachir who did an interview with me.
It was done “live to tape” and he has since transcribed it. I think it turned out really good, and I had a fun time doing it, so thanks to John for taking the time for this.
27 September 2007
The outcome of my last entry about obfuscating email addresses is the HTML → Encrypt Selection (ROT13) command which replaces the current selection with JavaScript to output it (with the actual markup stored in ROT13).
Since most of my pages are already preprocessed, I decided to turn it into a general filter that works on a full HTML page. It replaces all document nodes (which contain an email address) with the corresponding JavaScript.
Since it has given me much joy to once again be able to write plain email addresses in my pages (without worrying about spam harvesters) I figured I should share :) But do double-check that the result you get from the filter is actually what you expect — the parser used is written for (my) valid HTML pages with potential script tags (such as <% … %> and <?php … ?>).
By replacing the full document node with a <script> … </script>-construct it should keep the resulting page as well-formed. Though the filter inserts a <noscript>-tag to improve usability (for clients without JavaScript) but the <noscript>-tag is a block-level tag, so this will generally make the page non-valid. If you want a validating page then you can remove the <noscript> stuff at line 119.
I have pondered a few ways to keep the page as valid and still insert a <noscript>-tag, but I think the best approach would be to instead have the <noscript>-content be the default content, and then use JavaScript to replace that (so avoid using the <noscript>-tag). Ideally the fallback content should be a human-decodable version of the email address.
If anyone ports the filter to PHP please let me know, as I would love to turn it into a WordPress plug-in.
5 September 2007

Cédric Bleimling directed my attention toward the video tutorial site for Microsoft Silverlight. Not only are they using TextMate for the screencast, they put its icon on the graphics for the download.
Clearly the message has been well received in Redmond :)
29 August 2007
Update: Please no more letters asking for free licenses!
I get a fair number of letters asking me to port TextMate to other platforms (not to mention that “textmate for windows” is now in the top 5 of search phrases I receive hits for) — mostly I politely reply that I am presently not interested in doing a port (from now on though, I will just send a link to this post).
Occasionally I write a bit more, as was the case with Chris Campbell. He sent me back the image below where you can see part of the conversation (click to enlarge).

I love how Chris took the time to set this up and email me the picture. It deserves to be preserved in the form of a blog post :)
It also made me look into setting up a dedicated program for “buy a Mac, get TextMate for free” (in a way where I would still get some revenue). Unfortunately Amazon’s operating agreement for their affiliate program says:
In addition, you may not: (a) directly or indirectly offer any person or entity any consideration or incentive (including, without limitation, payment of money (including any rebate), or granting of any discount or other benefit) for using Special Links on your site to access the Amazon.com Site (e.g., by implementing any “rewards” program for persons or entities who use Special Links on your site to access the Amazon.com Site);
That is no good. At Apple I can only find a .Mac affiliate program. So does anyone have an idea about how to handle this? And preferably in a way where it could be fully automated.
10 August 2007
Unfortunately TextDrive is having problems with DDoS attacks which means that (at least some) license key emails are queued locally instead of being fully delivered.
As noted in my previous post I am presently attending C4 in Chicago (that is, registration starts in two hours) so hopefully people registering will be okay with some noticeable delay receiving the license key.
If your copy has expired, and you are affected by the delay, please write textmate (at) gmail dot com and state this (yes, use the gmail address, since the various @macromates.com addresses will also be affected by the DDoS attack).
And for the people affected, please accept my apology — I will look into a backup server solution when I return from vacation.