TextMate: HTML Tag Completion

Wed, May 28

Click the image to see more about about JJ and the CD (at Amazon)


The HTML bundle in Textmate offers a wide selection of features for formatting, working with tags and previewing within a browser. One of the options that offers great mileage is Insert Open/Close tag with Current Word. If you have been working with TextMate and HTML for any length of time, this tip won” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”t be new. However, if you are new to either, I think you” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”ll find this little trick quite helpful.

The tip is all about working with tags, essentially offering an automated means to insert matching tags and intelligently placing the cursor based on the tag type. Once you get used to using this trick, you” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”ll spend a lot less time trying searching for that unmatched tag in your source, resulting in valid HTML the first time around.

The music in the video is J.J. Cale and the song: Call Me the Breeze.
A longer clip of J.J. Cale jamming:

Click the image to see more about about JJ and the CD (at Amazon)


one small note:
you actually only need to type ctrl + < to achieve this (no shift key needed).

that’s all. thanks for a great series of useful tips on the best text editor around!

by eric on Jun 9, 2008. #

Hi Eric, I just tried it without the Shift keystroke and it doesn’t work. To get it to work I have to type the full key combo of Ctrl-Shift as mentioned in the Screencast.

by Richard on Jul 8, 2008. #