Is this possible in Sublime? Is there a package that will tidy html (and erb if possible) (no scripts please)? It is dead simple in Textmate and it is critical to productivity when doing tag wraps around selections.
You can setup a command to run to replace a selection of html with the tidy version. Press Ctl+R to bring up the command window and enter tidy -utf8 -asxhtml -i for the command which formats indented xhtml using utf8 encoding. Check the two boxes to "Pass selection as input" and "Insert output". You can also specify custom key bindings there.
I have the Tag plugin and there is NO tidy function. So I take it this is beyond ST2 at this time. This is really surprising given the other capabilities. I need to have the ability to wrap a section in a new tag and then have it indented properly. The current command for wrapping a tag around a selection mangles the indentation so much as to be useless. It is more time effective to do it by hand. I have to assume that it was intended as a step in wrapping as the ST2 method of wrapping multiple lines with multiple tags is very nice. But even in that case it still needs to be tidied. If only after that I could then run a simple tidy to get the nesting and indention right it would be great.
HTML tidy is the probably the most popular HTML tidying utility available.This is an online version of HTML Tidy.It can be used on all major operating systems.In this is the best time to consider using HTML Tidy.Please try it, it works great