|
| 1 | +SublimeLinter-html-tidy |
| 2 | +========================= |
| 3 | + |
| 4 | +This linter plugin for [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter3) provides an interface to tidy (either the [html4](http://tidy.sourceforge.net) or [html5]() version). It will be used with files that have the “HTML” syntax. |
| 5 | + |
| 6 | +## Installation |
| 7 | + |
| 8 | +### Linter installation |
| 9 | +Before installing this plugin, you must ensure that `tidy` is installed on your system. |
| 10 | + |
| 11 | +- **Mac OS X** – `tidy` comes preinstalled on recent versions of Mac OS X. You can install a more recent version by using [Homebrew](http://brew.sh) and `brew install homebrew/dupes/tidy`. |
| 12 | + |
| 13 | +- **Linux** – You should be able to install tidy using the system’s package manager. For example, on Debian-based systems (including Ubuntu), you can install with `sudo apt-get install tidy`. |
| 14 | + |
| 15 | +- **Windows** – A Windows binary is available [here](http://www.paehl.com/open_source/?HTML_Tidy_for_Windows). |
| 16 | + |
| 17 | +On Mac OS X and Linux, you can also try building the experimental [html5 tidy](https://github.com/w3c/tidy-html5). |
| 18 | + |
| 19 | +Once tidy is installed, you can proceed to install the SublimeLinter-html-tidy plugin. |
| 20 | + |
| 21 | +### Plugin installation |
| 22 | +Please use [Package Control](https://sublime.wbond.net/installation) to install the linter plugin. This will ensure that the plugin will be updated when new versions are available. If you want to install from source so you can modify the source code, you probably know what you are doing so we won’t cover that here. |
| 23 | + |
| 24 | +To install via Package Control, do the following: |
| 25 | + |
| 26 | +1. Within Sublime Text, bring up the [Command Palette](http://docs.sublimetext.info/en/sublime-text-3/extensibility/command_palette.html) and type `install`. Among the commands you should see `Package Control: Install Package`. If that command is not highlighted, use the keyboard or mouse to select it. There will be a pause of a few seconds while Package Control fetches the list of available plugins. |
| 27 | + |
| 28 | +1. When the plugin list appears, type `html-tidy`. Among the entries you should see `SublimeLinter-html-tidy`. If that entry is not highlighted, use the keyboard or mouse to select it. |
| 29 | + |
| 30 | +## Settings |
| 31 | +For general information on how SublimeLinter works with settings, please see [Settings](https://github.com/SublimeLinter/SublimeLinter.github.io/wiki/Settings). For information on generic linter settings, please see [Linter Settings](https://github.com/SublimeLinter/SublimeLinter.github.io/wiki/Linter-Settings). |
| 32 | + |
| 33 | +`tidy` must be configured via command line arguments. You can use the `"args"` linter setting to pass arguments to tidy. |
| 34 | + |
| 35 | +## Contributing |
| 36 | +If you would like to contribute enhancements or fixes, please do the following: |
| 37 | + |
| 38 | +1. Fork the plugin repository. |
| 39 | +1. Hack on a separate topic branch created from the latest `master`. |
| 40 | +1. Commit and push the topic branch. |
| 41 | +1. Make a pull request. |
| 42 | +1. Be patient. ;-) |
| 43 | + |
| 44 | +Please note that modications should follow these coding guidelines: |
| 45 | + |
| 46 | +- Indent is 4 spaces. |
| 47 | +- Code should pass flake8 and pep257 linters. |
| 48 | +- Vertical whitespace helps readability, don’t be afraid to use it. |
| 49 | + |
| 50 | +Thank you for helping out! |
0 commit comments