Sublime Text 2 for Mac command-line tool

I’m playing with various different text editors again for a bit – I’m sure there must be something better than Textmate, but I’ve never found it. Paul pointed me at Sublime Text 2 which has an (alpha) Mac client, so I’m playing with that for a couple of days. It has the two features I cannot live without – an “open file in this project” keyboard shortcut (it even reuses the textmate shortcut by default) and a command-line tool, though this latter is rather hidden off in the bundle. To enable it, you want

sudo ln -s /Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl /usr/bin/subl

It’s a really decent command-line, too – it’ll do the obvious “open file” and “open folder as project”, as well as the surprisingly useful “pipe into me to open text as a document” and the “edit file and hang command line till closed” that you need if you want to use it as a EDITOR shell variable. Nice.