7
|
1 " Vim syntax file
|
5277
|
2 " Language: HMTL Tidy configuration file (/etc/tidyrc ~/.tidyrc)
|
|
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
|
|
4 " Last Change: 2013 June 01
|
7
|
5
|
5277
|
6 if exists("b:current_syntax")
|
7
|
7 finish
|
|
8 endif
|
|
9
|
5277
|
10 setlocal iskeyword=@,48-57,-
|
7
|
11
|
5277
|
12 syn match tidyComment "^\s*//.*$" contains=tidyTodo
|
|
13 syn match tidyComment "^\s*#.*$" contains=tidyTodo
|
|
14 syn keyword tidyTodo TODO NOTE FIXME XXX contained
|
7
|
15
|
5277
|
16 syn match tidyAssignment "^[a-z0-9-]\+:\s*.*$" contains=tidyOption,@tidyValue,tidyDelimiter
|
|
17 syn match tidyDelimiter ":" contained
|
7
|
18
|
|
19 syn match tidyNewTagAssignment "^new-\l\+-tags:\s*.*$" contains=tidyNewTagOption,tidyNewTagDelimiter,tidyNewTagValue,tidyDelimiter
|
|
20 syn match tidyNewTagDelimiter "," contained
|
|
21 syn match tidyNewTagValue "\<\w\+\>" contained
|
|
22
|
|
23 syn case ignore
|
5277
|
24 syn keyword tidyBoolean t[rue] f[alse] y[es] n[o] contained
|
7
|
25 syn case match
|
5277
|
26 syn match tidyDoctype "\<\%(omit\|auto\|strict\|loose\|transitional\|user\)\>" contained
|
548
|
27 " NOTE: use match rather than keyword here so that tidyEncoding 'raw' does not
|
|
28 " always have precedence over tidyOption 'raw'
|
5277
|
29 syn match tidyEncoding "\<\%(ascii\|latin0\|latin1\|raw\|utf8\|iso2022\|mac\|utf16le\|utf16be\|utf16\|win1252\|ibm858\|big5\|shiftjis\)\>" contained
|
|
30 syn match tidyNewline "\<\%(LF\|CRLF\|CR\)\>"
|
|
31 syn match tidyNumber "\<\d\+\>" contained
|
|
32 syn match tidyRepeat "\<\%(keep-first\|keep-last\)\>" contained
|
|
33 syn region tidyString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
|
|
34 syn region tidyString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
|
|
35 syn cluster tidyValue contains=tidyBoolean,tidyDoctype,tidyEncoding,tidyNewline,tidyNumber,tidyRepeat,tidyString
|
7
|
36
|
5277
|
37 syn match tidyOption "^accessibility-check" contained
|
|
38 syn match tidyOption "^add-xml-decl" contained
|
|
39 syn match tidyOption "^add-xml-pi" contained
|
|
40 syn match tidyOption "^add-xml-space" contained
|
|
41 syn match tidyOption "^alt-text" contained
|
|
42 syn match tidyOption "^anchor-as-name" contained
|
|
43 syn match tidyOption "^ascii-chars" contained
|
|
44 syn match tidyOption "^assume-xml-procins" contained
|
|
45 syn match tidyOption "^bare" contained
|
|
46 syn match tidyOption "^break-before-br" contained
|
|
47 syn match tidyOption "^char-encoding" contained
|
|
48 syn match tidyOption "^clean" contained
|
|
49 syn match tidyOption "^css-prefix" contained
|
|
50 syn match tidyOption "^decorate-inferred-ul" contained
|
|
51 syn match tidyOption "^doctype" contained
|
|
52 syn match tidyOption "^doctype-mode" contained
|
|
53 syn match tidyOption "^drop-empty-paras" contained
|
|
54 syn match tidyOption "^drop-font-tags" contained
|
|
55 syn match tidyOption "^drop-proprietary-attributes" contained
|
|
56 syn match tidyOption "^enclose-block-text" contained
|
|
57 syn match tidyOption "^enclose-text" contained
|
|
58 syn match tidyOption "^error-file" contained
|
|
59 syn match tidyOption "^escape-cdata" contained
|
|
60 syn match tidyOption "^fix-backslash" contained
|
|
61 syn match tidyOption "^fix-bad-comments" contained
|
|
62 syn match tidyOption "^fix-uri" contained
|
|
63 syn match tidyOption "^force-output" contained
|
|
64 syn match tidyOption "^gnu-emacs" contained
|
|
65 syn match tidyOption "^gnu-emacs-file" contained
|
|
66 syn match tidyOption "^hide-comments" contained
|
|
67 syn match tidyOption "^hide-endtags" contained
|
|
68 syn match tidyOption "^indent" contained
|
|
69 syn match tidyOption "^indent-attributes" contained
|
|
70 syn match tidyOption "^indent-cdata" contained
|
|
71 syn match tidyOption "^indent-spaces" contained
|
|
72 syn match tidyOption "^input-encoding" contained
|
|
73 syn match tidyOption "^input-xml" contained
|
|
74 syn match tidyOption "^join-classes" contained
|
|
75 syn match tidyOption "^join-styles" contained
|
|
76 syn match tidyOption "^keep-time" contained
|
|
77 syn match tidyOption "^language" contained
|
|
78 syn match tidyOption "^literal-attributes" contained
|
|
79 syn match tidyOption "^logical-emphasis" contained
|
|
80 syn match tidyOption "^lower-literals" contained
|
|
81 syn match tidyOption "^markup" contained
|
|
82 syn match tidyOption "^merge-divs" contained
|
|
83 syn match tidyOption "^merge-spans" contained
|
|
84 syn match tidyOption "^ncr" contained
|
|
85 syn match tidyOption "^newline" contained
|
|
86 syn match tidyOption "^numeric-entities" contained
|
|
87 syn match tidyOption "^output-bom" contained
|
|
88 syn match tidyOption "^output-encoding" contained
|
|
89 syn match tidyOption "^output-file" contained
|
|
90 syn match tidyOption "^output-html" contained
|
|
91 syn match tidyOption "^output-xhtml" contained
|
|
92 syn match tidyOption "^output-xml" contained
|
|
93 syn match tidyOption "^preserve-entities" contained
|
|
94 syn match tidyOption "^punctuation-wrap" contained
|
|
95 syn match tidyOption "^quiet" contained
|
|
96 syn match tidyOption "^quote-ampersand" contained
|
|
97 syn match tidyOption "^quote-marks" contained
|
|
98 syn match tidyOption "^quote-nbsp" contained
|
|
99 syn match tidyOption "^raw" contained
|
|
100 syn match tidyOption "^repeated-attributes" contained
|
|
101 syn match tidyOption "^replace-color" contained
|
|
102 syn match tidyOption "^show-body-only" contained
|
|
103 syn match tidyOption "^show-errors" contained
|
|
104 syn match tidyOption "^show-warnings" contained
|
|
105 syn match tidyOption "^slide-style" contained
|
|
106 syn match tidyOption "^sort-attributes" contained
|
|
107 syn match tidyOption "^split" contained
|
|
108 syn match tidyOption "^tab-size" contained
|
|
109 syn match tidyOption "^tidy-mark" contained
|
|
110 syn match tidyOption "^uppercase-attributes" contained
|
|
111 syn match tidyOption "^uppercase-tags" contained
|
|
112 syn match tidyOption "^word-2000" contained
|
|
113 syn match tidyOption "^wrap" contained
|
|
114 syn match tidyOption "^wrap-asp" contained
|
|
115 syn match tidyOption "^wrap-attributes" contained
|
|
116 syn match tidyOption "^wrap-jste" contained
|
|
117 syn match tidyOption "^wrap-php" contained
|
|
118 syn match tidyOption "^wrap-script-literals" contained
|
|
119 syn match tidyOption "^wrap-sections" contained
|
|
120 syn match tidyOption "^write-back" contained
|
|
121 syn match tidyOption "^vertical-space" contained
|
7
|
122
|
5277
|
123 syn match tidyNewTagOption "^new-blocklevel-tags" contained
|
|
124 syn match tidyNewTagOption "^new-empty-tags" contained
|
|
125 syn match tidyNewTagOption "^new-inline-tags" contained
|
|
126 syn match tidyNewTagOption "^new-pre-tags" contained
|
7
|
127
|
5277
|
128 hi def link tidyBoolean Boolean
|
|
129 hi def link tidyComment Comment
|
|
130 hi def link tidyDelimiter Special
|
|
131 hi def link tidyDoctype Constant
|
|
132 hi def link tidyEncoding Constant
|
|
133 hi def link tidyNewline Constant
|
|
134 hi def link tidyNewTagDelimiter Special
|
|
135 hi def link tidyNewTagOption Identifier
|
|
136 hi def link tidyNewTagValue Constant
|
|
137 hi def link tidyNumber Number
|
|
138 hi def link tidyOption Identifier
|
|
139 hi def link tidyRepeat Constant
|
|
140 hi def link tidyString String
|
|
141 hi def link tidyTodo Todo
|
7
|
142
|
|
143 let b:current_syntax = "tidy"
|
|
144
|
|
145 " vim: ts=8
|