EnableXHTMLTags

HowTo.EnableXHTMLTags History

Hide minor edits - Show changes to output

June 09, 2008, at 15:53 UTC by Allan Odgaard -
Changed line 7 from:
Here add a new variable with a name of `TM_XHTML` and a value of ` /`. That is a space followed by `/`. This text will be inserted verbatim after each tag with empty content model.
to:
Here add a new variable with a name of `TM_XHTML` and a value of ` /`. That is a space followed by `/`. This text will be inserted verbatim after each tag name with empty content model.
June 09, 2008, at 15:51 UTC by Allan Odgaard - How to make TextMate spew out invalid SGML tags
Added lines 1-12:
The TextMate HTML bundle has a lot of helpful commands which create or work with tags.

Starting with XHTML, tags with an an empty content model like `<hr>` should be written as `<hr />`. As to whether or not one should adopt XHTML, I’ll just link to [Ian Hickson advocacy against XHTML][].

To make TextMate use XHTML tags, go to _Preferences → Advanced → Shell Variables_.

Here add a new variable with a name of `TM_XHTML` and a value of ` /`. That is a space followed by `/`. This text will be inserted verbatim after each tag with empty content model.

Additionally the presence of the variable will also enable XHTML mode for Tidy, Markdown conversion, etc.

[Ian Hickson advocacy against XHTML]: http://www.hixie.ch/advocacy/xhtml