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.