EDIT : Use Tag Package instead.
I was unable to find a solution to format simple bits of HTML/XML/RDF/XUL ( some invalid ), then I created āTagIndentā plugin:
Usage
There is a context menu item called āIndent Tags on Selectionā
There is also a Main menuitem: Edit -> Tag -> āIndent Tags on Selectionā.
There is also a command called āIndent Tags on Selectionā.
Aims
Aims to add and/or apply correct indentation to little portions of HTML or XML, not to complete documents.
Information
It takes the starting āindentation levelā from the first line of each selection and sums tabs as needed.
On empty tags, and on tags with less than 40 characters, it writes the tag in one line.
Short-cut is āctrl+shift+hā
Source / Installation
github.com/SublimeText/TagIndent
Update:
- Repository moved to SublimeText Organization at github.
- Support self closing tags.