Macromates‘ great text editing application, TextMate, contains powerful Ruby-based scripts to allow for simple language scope editing. The HTML bundle, in particular, contains many ready-made HTML snippets which can be inserted into your web development workflow with a simple TAB-trigger or key combination. For example, if I type img then hit the ⇥ (tab) key then TextMate will expand that into an actual XHTML image tag with selectable attributes. In fact, if you have text copied into the clipboard, then TextMate will automatically use that as the image’s src path. I’ve modified a few of these snippets myself, in order to have certain items fully comply with the XHTML 1.0 Transitional DOCTYPE. This is one of the greatest strengths of TextMate, because any snippet or command can be customized from within the application’s Bundle Editor. For now I’ll explain how to extend the functionality of the HTML version of Hyperlink Helper (Wrap Word / Selection as Link) command.
Continue reading
TextMate: Extending the HTML Hyperlink Helper
1