By josh / September 21, 2012

Quick Tip: Fold HTML tag attributes while editing cluttered docs

The Fold Tag Attributes command is a lifesaver when you’re editing cluttered HTML and XML documents. By hiding each tag’s attributes, it brings the structure and content of your document to the fore when you’re looking for missing tags or editing a piece of content in a document with horrendous inline styling (shudder).

Unfolded HTML attributes

HTML attributes make it hard to see the content in a document.

Folded HTML attributes

Folding the attributes away emphasizes the content and structure of your document.

To invoke Fold Tag Attributes:

  • Click Edit | Code Folding | Fold Tag Attributes.
    Or press Command+K, Command+T on Mac OS X or Ctrl+K, Ctrl+T on Windows or Linux.

Use the Unfold and Unfold All commands to expand sections of your document as needed.

P.S. Do you love using Sublime to get more done? Sign up for the free Sublime Text Tips newsletter to get more tips every week. As a bonus, I’ll send you a 12-page guide to Sublime’s advanced editing features so you can start using Sublime more effectively–today.

About the author

josh

Click here to add a comment

Leave a comment: