Navigation

ADS specializes in using Ruby on Rails to build advanced, scalable, database-backed web sites for organizations of all sizes. Find out more at our website.

Atlantic Dominion Solutions

TextMate Tip: HTML Tags

By: Chris Kaukis | Tags:

Have you ever just wanted to select some text and wrap it in a tag instead of jumping to the beginning and end of the lines? Or perhaps you get tired of remembering to close your tags as you go and you wish it was done for you. Both are possible, you just have to know the right keystrokes.

In any HTML editing mode in TextMate (HTML, HTML (Rails), etc) try the following then start typing:

Shift + ctrl + W

You can also select text you want to wrap in the tag.

Click here to view the screencast and see an example

In the screencast, I also used another nice little shortcut.

 + return

This will do a carriage return to the next line starting at the end of the current line, not at the current cursor location.

The Fine Print: It’s my first screencast, it might suck.

Related Posts

You can leave a response, or trackback from your own site.

Print This Post Print This Post

4 Responses to “TextMate Tip: HTML Tags”

On March 10th, 2008 at 6:13 am Reply to this comment A Fresh Cup » Blog Archive » Double Shot #161 said:

[...] TextMate Tip: HTML Tags - Chris Kaukis at ADS has been doing a series of these. So far they’ve been useful. [...]

On March 10th, 2008 at 9:34 am Reply to this comment Steven said:

The Command-key icon (Apple) does not show in firefox.

On March 13th, 2008 at 10:13 am Reply to this comment Arnaud M said:

I think you should refrain from using the “apple” character, it does not show correctly outside Macs (tried on Windows Opera, IE, Firefox and Safari). Stick to Cmd+Key

On March 13th, 2008 at 10:33 am Reply to this comment Chris said:

Why would you be using TextMate on Windows? :)

Or maybe, how?

Leave a Reply