This package provides the following services:
formatter-tidy package
Formatter for HTML, XML.
This Formatter plugin for Formatter provides an interface to tidy(-html5).
Installation
-
Install tidy or tidy-html5 (ex: on OSX with brew ->
brew install tidy-html5
) -
Install Formatter package via Atom
- or with
apm install formatter
- or with
-
Install formatter-tidy package via Atom
- or with
apm install formatter-tidy
- or with
Usage
Warning
Tidy is primarily a validator and not a HTML/XML formatter.
In your source compatible file
Default (inspired from IntelliJ):
'atom-text-editor':
'alt-ctrl-l': 'formatter:format-code'
'alt-cmd-l': 'formatter:format-code'
List of config
-
Path to the exectuable
- Full path tidy
-
HTML language
-
Enable formatter for HTML language (need restart Atom)
-
Arguments passed to the formatter HTML language
- Example :
--wrap, 160
- Example :
-
-
XML language
-
Enable formatter for XML language (need restart Atom)
-
Arguments passed to the formatter XML language
- Example :
--wrap, 80, --indent-attributes, yes
- Example :
-
TODO
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request 😄
License
See LICENSE.md