@see TextMate Snippet

I've been doing a ton of work with the newest Zend Framework version 1.8.2 this weekend. I've found that typing out all the requires for each class can be a pain, so I made a quick TextMate snippet to make adding @see directives for phpdoc at the same time as the require_once directive. Here it is; simple but useful:

/**
 * @see $1
 */
require_once "${1/_///g}.php";$0

Add this as a "Tab Trigger" for the word "see" then just type "see" and hit tab then type your class name. It will auto fill the comment and the path to the pear-conventionally-named .php file. Got any other useful TextMate snippets? Please do share!

June 6th, 2009 | Permalink