1" Vim syntax file 2" Language: HMTL Tidy configuration file (/etc/tidyrc ~/.tidyrc) 3" Maintainer: Doug Kearns <[email protected]> 4" Last Change: 2016 Apr 24 5 6if exists("b:current_syntax") 7 finish 8endif 9 10let s:cpo_save = &cpo 11set cpo&vim 12 13syn iskeyword @,48-57,-,_ 14 15syn case ignore 16syn keyword tidyBoolean contained t[rue] f[alse] y[es] n[o] 1 0 17syn keyword tidyAutoBoolean contained t[rue] f[alse] y[es] n[o] 1 0 auto 18syn case match 19syn keyword tidyDoctype contained html5 omit auto strict loose transitional user 20syn keyword tidyEncoding contained raw ascii latin0 latin1 utf8 iso2022 mac win1252 ibm858 utf16le utf16be utf16 big5 shiftjis 21syn keyword tidyNewline contained LF CRLF CR 22syn match tidyNumber contained "\<\d\+\>" 23syn keyword tidyRepeat contained keep-first keep-last 24syn keyword tidySorter contained alpha none 25syn region tidyString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline 26syn region tidyString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline 27syn match tidyTags contained "\<\w\+\(\s*,\s*\w\+\)*\>" 28 29syn keyword tidyBooleanOption add-xml-decl add-xml-pi add-xml-space 30 \ anchor-as-name ascii-chars assume-xml-procins bare break-before-br 31 \ clean coerce-endtags decorate-inferred-ul drop-empty-paras 32 \ drop-empty-elements drop-font-tags drop-proprietary-attributes 33 \ enclose-block-text enclose-text escape-cdata escape-scripts 34 \ fix-backslash fix-bad-comments fix-uri force-output gdoc gnu-emacs 35 \ hide-comments hide-endtags indent-attributes indent-cdata 36 \ indent-with-tabs input-xml join-classes join-styles keep-time 37 \ language literal-attributes logical-emphasis lower-literals markup 38 \ merge-emphasis ncr numeric-entities omit-optional-tags output-html 39 \ output-xhtml output-xml preserve-entities punctuation-wrap quiet 40 \ quote-ampersand quote-marks quote-nbsp raw replace-color show-info 41 \ show-warnings skip-nested split strict-tags-attributes tidy-mark 42 \ uppercase-attributes uppercase-tags word-2000 wrap-asp 43 \ wrap-attributes wrap-jste wrap-php wrap-script-literals 44 \ wrap-sections write-back 45 \ contained nextgroup=tidyBooleanDelimiter 46 47syn match tidyBooleanDelimiter ":" nextgroup=tidyBoolean contained skipwhite 48 49syn keyword tidyAutoBooleanOption indent merge-divs merge-spans output-bom show-body-only vertical-space contained nextgroup=tidyAutoBooleanDelimiter 50syn match tidyAutoBooleanDelimiter ":" nextgroup=tidyAutoBoolean contained skipwhite 51 52syn keyword tidyCSSSelectorOption css-prefix contained nextgroup=tidyCSSSelectorDelimiter 53syn match tidyCSSSelectorDelimiter ":" nextgroup=tidyCSSSelector contained skipwhite 54 55syn keyword tidyDoctypeOption doctype contained nextgroup=tidyDoctypeDelimiter 56syn match tidyDoctypeDelimiter ":" nextgroup=tidyDoctype contained skipwhite 57 58syn keyword tidyEncodingOption char-encoding input-encoding output-encoding contained nextgroup=tidyEncodingDelimiter 59syn match tidyEncodingDelimiter ":" nextgroup=tidyEncoding contained skipwhite 60 61syn keyword tidyIntegerOption accessibility-check doctype-mode indent-spaces show-errors tab-size wrap contained nextgroup=tidyIntegerDelimiter 62syn match tidyIntegerDelimiter ":" nextgroup=tidyNumber contained skipwhite 63 64syn keyword tidyNameOption slide-style contained nextgroup=tidyNameDelimiter 65syn match tidyNameDelimiter ":" nextgroup=tidyName contained skipwhite 66 67syn keyword tidyNewlineOption newline contained nextgroup=tidyNewlineDelimiter 68syn match tidyNewlineDelimiter ":" nextgroup=tidyNewline contained skipwhite 69 70syn keyword tidyTagsOption new-blocklevel-tags new-empty-tags new-inline-tags new-pre-tags contained nextgroup=tidyTagsDelimiter 71syn match tidyTagsDelimiter ":" nextgroup=tidyTags contained skipwhite 72 73syn keyword tidyRepeatOption repeated-attributes contained nextgroup=tidyRepeatDelimiter 74syn match tidyRepeatDelimiter ":" nextgroup=tidyRepeat contained skipwhite 75 76syn keyword tidySorterOption sort-attributes contained nextgroup=tidySorterDelimiter 77syn match tidySorterDelimiter ":" nextgroup=tidySorter contained skipwhite 78 79syn keyword tidyStringOption alt-text error-file gnu-emacs-file output-file contained nextgroup=tidyStringDelimiter 80syn match tidyStringDelimiter ":" nextgroup=tidyString contained skipwhite 81 82syn cluster tidyOptions contains=tidy.*Option 83 84syn match tidyStart "^" nextgroup=@tidyOptions 85 86syn match tidyComment "^\s*//.*$" contains=tidyTodo 87syn match tidyComment "^\s*#.*$" contains=tidyTodo 88syn keyword tidyTodo TODO NOTE FIXME XXX contained 89 90hi def link tidyAutoBooleanOption Identifier 91hi def link tidyBooleanOption Identifier 92hi def link tidyCSSSelectorOption Identifier 93hi def link tidyDoctypeOption Identifier 94hi def link tidyEncodingOption Identifier 95hi def link tidyIntegerOption Identifier 96hi def link tidyNameOption Identifier 97hi def link tidyNewlineOption Identifier 98hi def link tidyTagsOption Identifier 99hi def link tidyRepeatOption Identifier 100hi def link tidySorterOption Identifier 101hi def link tidyStringOption Identifier 102 103hi def link tidyAutoBooleanDelimiter Special 104hi def link tidyBooleanDelimiter Special 105hi def link tidyCSSSelectorDelimiter Special 106hi def link tidyDoctypeDelimiter Special 107hi def link tidyEncodingDelimiter Special 108hi def link tidyIntegerDelimiter Special 109hi def link tidyNameDelimiter Special 110hi def link tidyNewlineDelimiter Special 111hi def link tidyTagsDelimiter Special 112hi def link tidyRepeatDelimiter Special 113hi def link tidySorterDelimiter Special 114hi def link tidyStringDelimiter Special 115 116hi def link tidyAutoBoolean Boolean 117hi def link tidyBoolean Boolean 118hi def link tidyDoctype Constant 119hi def link tidyEncoding Constant 120hi def link tidyNewline Constant 121hi def link tidyTags Constant 122hi def link tidyNumber Number 123hi def link tidyRepeat Constant 124hi def link tidySorter Constant 125hi def link tidyString String 126 127hi def link tidyComment Comment 128hi def link tidyTodo Todo 129 130let b:current_syntax = "tidy" 131 132let &cpo = s:cpo_save 133unlet s:cpo_save 134 135" vim: ts=8 136