- Mar
- 06
- 2008
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.


4 Responses to “TextMate Tip: HTML Tags”
On March 10th, 2008 at 6:13 am
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
Steven said:
The Command-key icon (Apple) does not show in firefox.
On March 13th, 2008 at 10:13 am
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
Chris said:
Why would you be using TextMate on Windows?
Or maybe, how?