Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

(v3.7.0) HTML: tidy

LCD 47 edited this page Feb 11, 2016 · 2 revisions

Maintainer: Martin Grenfell martin.grenfell@gmail.com

HTML Tidy is a syntax checker and formatter for HTML. See the HTML Tidy Library Project page for more information about tidy and installation instructions.

Note

If you need to check HTML5 sources, you might consider installing HTML Tidy for HTML5 instead. It's a fork of HTML Tidy, and it can be used without changes by syntastic. Just point g:syntastic_html_tidy_exec to it:

let g:syntastic_html_tidy_exec = 'tidy5'

Checker options

g:syntastic_html_tidy_ignore_errors (list; default: [])
list of errors to ignore
g:syntastic_html_tidy_blocklevel_tags (list; default: [])
list of additional blocklevel tags, to be added to --new-blocklevel-tags
g:syntastic_html_tidy_inline_tags (list; default: [])
list of additional inline tags, to be added to --new-inline-tags
g:syntastic_html_tidy_empty_tags (list; default: [])
list of additional empty tags, to be added to --new-empty-tags

The patterns in g:syntastic_html_tidy_ignore_errors are case-sensitive, and are matched as substrings (not regular expressions) against the error messages.

Alternatively, you can ignore messages using the general mechanisms of g:syntastic_quiet_messages and g:syntastic_html_tidy_quiet_messages. See :help 'syntastic_quiet_messages' for details.

Example

If tidy produces the error <input> proprietary attribute "role" and you want to ignore all errors of this specific type, add something like this to your vimrc:

let g:syntastic_html_tidy_ignore_errors = [ '<input> proprietary attribute "role"' ]
Clone this wiki locally