TextMate Tricks
Time for another round of links to cool stuff related to TextMate.
Multiple Arbitrary Simultaneous Carets
Duane Johnson, who should already be known for his many Rails bundle contributions (which started as syncPeople on Rails) has taken it upon himself to implement requests that I turn down. His wish? To have multiple arbitrary simultaneous carets, so that he could type once, and have the text inserted multiple places.
It sounds like something only direct access to the text editing core would allow, but not if you are creative. Witness his MASC bundle (well, it’s actually his TextMate bundle, but he refers to this part of it as MASC). There is a screencast which shows it in action, and it looks very smooth!
WebMate — Editable HTML Preview
James G. Speth had another itch to scratch (actually two, but only one can be downloaded from his website). The ability to make the web preview of TextMate editable, so while you can currently edit the HTML source and preview that, you can’t edit the preview, and have the source updated accordingly. Well, say hello to WebMate, a plug-in which allows just that!
Edit in TextMate from Apple Mail
Hawk Wings notes that TextMate can be used as external editor for Mail. Although I myself am behind this feature, I haven’t made any mention of it outside of the release notes, but it is actually quite nice.
As noted on the blog, you need to install the Edit in TextMate input manager, which is done by clicking the gear menu in the status bar (inside TextMate), navigating to the TextMate submenu and selecting Install “Edit in TextMate”…
After that, relaunch Mail, and it will have a new item in the Edit menu, which allows you to call up TextMate for the current letter (in the compose window). If you are using the cutting edge version of TextMate (presently r985) or have the Mail bundle from the subversion repository, you will get syntax highlighting of quoted text, and ⌃Q will be overloaded to reformat text respecting quotation levels, plus a few other niceties, e.g. ⌃{ inserts [...]
.
Note: This only works in Tiger. Also note that this is essentially a hack, and I of course make no claim to its suitability for any purpose etc. The source for the hack (input manager) is available from the bundles repository.
PyTestMate — Supporting py.test
Timothy Grant has added support for py.test in the form of PyTestMate.
Trick Your TextMate: Snippets
Garrett Domon has put up part two of his Trick Your TextMate series.
PHPfi Lookups in TextMate
Bob McDonald describes how to make PHPfi lookups from TextMate. This allows access to the PHP documentation even when offline, as the default Documentation for Word in the PHP bundle uses the online site for PHP. This of course requires that you have PHPfi installed.