A quick-and-dirty Sublime Text 3 plugin to run HTML5 Tidy on a file.
- Git: Clone the repo into your packages folder
- Archive: copy the downloaded file into you packages folder, changing the extension to
.sublime-package
The config file has three keys to configure Tidy:
cmd: The name of the command to execute. Usually justtidy, if it's present in thePATH.switches: List of command switches.['m', 'q']is translated to-mq(or-m -q)settings: Set any tidy config settings here. Use0and1for boolean values and strings for the rest.
The plugin has only a few configuration settings:
output_to_console: The output of the Tidy command will be printed to the Sublime console.save_before_tidy: Force the current buffer to be saved to disk before running Tidy on it.
Press Ctrl+Shift+P, start typing HTML5 Tidy until the command appears, select it and press Enter.
You can bind a key to it with this snippet in your key-bindings file:
{
"keys": ["ctrl+shift+t"],
"command": "html5_tidy"
}