Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
Bram Moolenaar | 9d98fe9 | 2013-08-03 18:35:36 +0200 | [diff] [blame] | 2 | " Language: HMTL Tidy configuration file (/etc/tidyrc ~/.tidyrc) |
| 3 | " Maintainer: Doug Kearns <dougkearns@gmail.com> |
Bram Moolenaar | 0648142 | 2016-04-30 15:13:38 +0200 | [diff] [blame] | 4 | " Last Change: 2016 Apr 24 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 5 | |
Bram Moolenaar | 9d98fe9 | 2013-08-03 18:35:36 +0200 | [diff] [blame] | 6 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 7 | finish |
| 8 | endif |
| 9 | |
Bram Moolenaar | 0648142 | 2016-04-30 15:13:38 +0200 | [diff] [blame] | 10 | let s:cpo_save = &cpo |
| 11 | set cpo&vim |
| 12 | |
| 13 | syn iskeyword @,48-57,-,_ |
| 14 | |
| 15 | syn case ignore |
| 16 | syn keyword tidyBoolean contained t[rue] f[alse] y[es] n[o] 1 0 |
| 17 | syn keyword tidyAutoBoolean contained t[rue] f[alse] y[es] n[o] 1 0 auto |
| 18 | syn case match |
| 19 | syn keyword tidyDoctype contained html5 omit auto strict loose transitional user |
| 20 | syn keyword tidyEncoding contained raw ascii latin0 latin1 utf8 iso2022 mac win1252 ibm858 utf16le utf16be utf16 big5 shiftjis |
| 21 | syn keyword tidyNewline contained LF CRLF CR |
| 22 | syn match tidyNumber contained "\<\d\+\>" |
| 23 | syn keyword tidyRepeat contained keep-first keep-last |
| 24 | syn keyword tidySorter contained alpha none |
| 25 | syn region tidyString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline |
| 26 | syn region tidyString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline |
| 27 | syn match tidyTags contained "\<\w\+\(\s*,\s*\w\+\)*\>" |
| 28 | |
| 29 | syn 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 | |
| 47 | syn match tidyBooleanDelimiter ":" nextgroup=tidyBoolean contained skipwhite |
| 48 | |
| 49 | syn keyword tidyAutoBooleanOption indent merge-divs merge-spans output-bom show-body-only vertical-space contained nextgroup=tidyAutoBooleanDelimiter |
| 50 | syn match tidyAutoBooleanDelimiter ":" nextgroup=tidyAutoBoolean contained skipwhite |
| 51 | |
| 52 | syn keyword tidyCSSSelectorOption css-prefix contained nextgroup=tidyCSSSelectorDelimiter |
| 53 | syn match tidyCSSSelectorDelimiter ":" nextgroup=tidyCSSSelector contained skipwhite |
| 54 | |
| 55 | syn keyword tidyDoctypeOption doctype contained nextgroup=tidyDoctypeDelimiter |
| 56 | syn match tidyDoctypeDelimiter ":" nextgroup=tidyDoctype contained skipwhite |
| 57 | |
| 58 | syn keyword tidyEncodingOption char-encoding input-encoding output-encoding contained nextgroup=tidyEncodingDelimiter |
| 59 | syn match tidyEncodingDelimiter ":" nextgroup=tidyEncoding contained skipwhite |
| 60 | |
| 61 | syn keyword tidyIntegerOption accessibility-check doctype-mode indent-spaces show-errors tab-size wrap contained nextgroup=tidyIntegerDelimiter |
| 62 | syn match tidyIntegerDelimiter ":" nextgroup=tidyNumber contained skipwhite |
| 63 | |
| 64 | syn keyword tidyNameOption slide-style contained nextgroup=tidyNameDelimiter |
| 65 | syn match tidyNameDelimiter ":" nextgroup=tidyName contained skipwhite |
| 66 | |
| 67 | syn keyword tidyNewlineOption newline contained nextgroup=tidyNewlineDelimiter |
| 68 | syn match tidyNewlineDelimiter ":" nextgroup=tidyNewline contained skipwhite |
| 69 | |
| 70 | syn keyword tidyTagsOption new-blocklevel-tags new-empty-tags new-inline-tags new-pre-tags contained nextgroup=tidyTagsDelimiter |
| 71 | syn match tidyTagsDelimiter ":" nextgroup=tidyTags contained skipwhite |
| 72 | |
| 73 | syn keyword tidyRepeatOption repeated-attributes contained nextgroup=tidyRepeatDelimiter |
| 74 | syn match tidyRepeatDelimiter ":" nextgroup=tidyRepeat contained skipwhite |
| 75 | |
| 76 | syn keyword tidySorterOption sort-attributes contained nextgroup=tidySorterDelimiter |
| 77 | syn match tidySorterDelimiter ":" nextgroup=tidySorter contained skipwhite |
| 78 | |
| 79 | syn keyword tidyStringOption alt-text error-file gnu-emacs-file output-file contained nextgroup=tidyStringDelimiter |
| 80 | syn match tidyStringDelimiter ":" nextgroup=tidyString contained skipwhite |
| 81 | |
| 82 | syn cluster tidyOptions contains=tidy.*Option |
| 83 | |
| 84 | syn match tidyStart "^" nextgroup=@tidyOptions |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 85 | |
Bram Moolenaar | 9d98fe9 | 2013-08-03 18:35:36 +0200 | [diff] [blame] | 86 | syn match tidyComment "^\s*//.*$" contains=tidyTodo |
| 87 | syn match tidyComment "^\s*#.*$" contains=tidyTodo |
| 88 | syn keyword tidyTodo TODO NOTE FIXME XXX contained |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 89 | |
Bram Moolenaar | 0648142 | 2016-04-30 15:13:38 +0200 | [diff] [blame] | 90 | hi def link tidyAutoBooleanOption Identifier |
| 91 | hi def link tidyBooleanOption Identifier |
| 92 | hi def link tidyCSSSelectorOption Identifier |
| 93 | hi def link tidyDoctypeOption Identifier |
| 94 | hi def link tidyEncodingOption Identifier |
| 95 | hi def link tidyIntegerOption Identifier |
| 96 | hi def link tidyNameOption Identifier |
| 97 | hi def link tidyNewlineOption Identifier |
| 98 | hi def link tidyTagsOption Identifier |
| 99 | hi def link tidyRepeatOption Identifier |
| 100 | hi def link tidySorterOption Identifier |
| 101 | hi def link tidyStringOption Identifier |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 102 | |
Bram Moolenaar | 0648142 | 2016-04-30 15:13:38 +0200 | [diff] [blame] | 103 | hi def link tidyAutoBooleanDelimiter Special |
| 104 | hi def link tidyBooleanDelimiter Special |
| 105 | hi def link tidyCSSSelectorDelimiter Special |
| 106 | hi def link tidyDoctypeDelimiter Special |
| 107 | hi def link tidyEncodingDelimiter Special |
| 108 | hi def link tidyIntegerDelimiter Special |
| 109 | hi def link tidyNameDelimiter Special |
| 110 | hi def link tidyNewlineDelimiter Special |
| 111 | hi def link tidyTagsDelimiter Special |
| 112 | hi def link tidyRepeatDelimiter Special |
| 113 | hi def link tidySorterDelimiter Special |
| 114 | hi def link tidyStringDelimiter Special |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 115 | |
Bram Moolenaar | 0648142 | 2016-04-30 15:13:38 +0200 | [diff] [blame] | 116 | hi def link tidyAutoBoolean Boolean |
| 117 | hi def link tidyBoolean Boolean |
| 118 | hi def link tidyDoctype Constant |
| 119 | hi def link tidyEncoding Constant |
| 120 | hi def link tidyNewline Constant |
| 121 | hi def link tidyTags Constant |
| 122 | hi def link tidyNumber Number |
| 123 | hi def link tidyRepeat Constant |
| 124 | hi def link tidySorter Constant |
| 125 | hi def link tidyString String |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 126 | |
Bram Moolenaar | 0648142 | 2016-04-30 15:13:38 +0200 | [diff] [blame] | 127 | hi def link tidyComment Comment |
| 128 | hi def link tidyTodo Todo |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 129 | |
| 130 | let b:current_syntax = "tidy" |
| 131 | |
Bram Moolenaar | 0648142 | 2016-04-30 15:13:38 +0200 | [diff] [blame] | 132 | let &cpo = s:cpo_save |
| 133 | unlet s:cpo_save |
| 134 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 135 | " vim: ts=8 |