Home

TextMate

Updated Drupal TextMate Bundle

Jan 14, 2007

I've updated my Drupal TextMate bundle script to also generate snippets for all PHP internal functions, including correct placeholders for the function arguments. It's a lifesaver when navigating PHP's bizarre Array or String APIs.

The script fetches the PHP function list straight from PHP CVS, but it still needs a Drupal tree to work. You can also copy in the contrib documentation to get snippets for hooks too (which even auto-fill in the module name). All PHP files within the given path are parsed.

To use it, place it in ~/Library/Application Support/TextMate/Bundles and run it:

php generate.php.txt [path to drupal]

In TextMate, go to Bundles › Bundle Editor › Reload Bundles to activate it.

(License: GPL)

I ♥ Cocoa

Oct 31, 2006

I've been using TextMate as my editor for a while, but it keeps amazing me every day. Today, I stumbled upon this cool screencast that shows off how easy it is to extend TextMate with Cocoa. You can add in custom dialogs, pipe in data from various sources and integrate it with the rest of TextMate.

This is mostly possible simply because of the coolness of Apple's Cocoa: the ability to drag and drop together not just dialogs, but the underlying model and controllers, is great. It's also the thing that confused me most when I first started doing Cocoa, because I had to unlearn the old principle that no behaviour is possible without code.

Using OS X's built-in Interface Builder and TextMate's tm_dialog command, he builds an SVN revision list viewer in a few easy steps. You can clearly see how Interface Builder is much more than a fancy dialog editor.

Intro to tm_dialog

Also, if you're still not convinced TextMate is the bee's knees, check out these 'casts about HTML editing:

Inserting HTML tags
HTML transformations

Yes, I'm sure you can do all this in arcane editors of old as well, but TextMate makes it easy to go from novice to expert, as every one of these commands is exposed in the UI in a transparent and consistent manner.

Images