annotate runtime/syntax/tidy.vim @ 2663:fd3346e3ccc0 v7.3.082

updated for version 7.3.082 Problem: Leaking file descriptor when hostname doesn't exist. Solution: Remove old debugging lines.
author Bram Moolenaar <bram@vim.org>
date Fri, 17 Dec 2010 12:19:21 +0100
parents f43150a669dc
children 42bf9264e64e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: HMTL Tidy configuration file ( /etc/tidyrc ~/.tidyrc )
36
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
3 " Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
125e80798a85 updated for version 7.0021
vimboss
parents: 7
diff changeset
4 " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/tidy.vim
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
5 " Last Change: 2005 Oct 06
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 set iskeyword=@,48-57,-
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 setlocal iskeyword=@,48-57,-
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match tidyComment "^\s*//.*$" contains=tidyTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match tidyComment "^\s*#.*$" contains=tidyTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword tidyTodo TODO NOTE FIXME XXX contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match tidyAssignment "^[a-z0-9-]\+:\s*.*$" contains=tidyOption,@tidyValue,tidyDelimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match tidyDelimiter ":" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match tidyNewTagAssignment "^new-\l\+-tags:\s*.*$" contains=tidyNewTagOption,tidyNewTagDelimiter,tidyNewTagValue,tidyDelimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match tidyNewTagDelimiter "," contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match tidyNewTagValue "\<\w\+\>" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword tidyBoolean t[rue] f[alse] y[es] n[o] contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn case match
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
35 syn match tidyDoctype "\<omit\|auto\|strict\|loose\|transitional\|user\>" contained
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
36 " NOTE: use match rather than keyword here so that tidyEncoding 'raw' does not
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
37 " always have precedence over tidyOption 'raw'
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
38 syn match tidyEncoding "\<\(ascii\|latin0\|latin1\|raw\|utf8\|iso2022\|mac\|utf16le\|utf16be\|utf16\|win1252\|ibm858\|big5\|shiftjis\)\>" contained
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
39 syn match tidyNewline "\<\(LF\|CRLF\|CR\)\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match tidyNumber "\<\d\+\>" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match tidyRepeat "\<keep-first\|keep-last\>" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn region tidyString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region tidyString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
44 syn cluster tidyValue contains=tidyBoolean,tidyDoctype,tidyEncoding,tidyNewline,tidyNumber,tidyRepeat,tidyString
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match tidyOption "^accessibility-check" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match tidyOption "^add-xml-decl" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match tidyOption "^add-xml-pi" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match tidyOption "^add-xml-space" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match tidyOption "^alt-text" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match tidyOption "^ascii-chars" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match tidyOption "^assume-xml-procins" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn match tidyOption "^bare" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match tidyOption "^break-before-br" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match tidyOption "^char-encoding" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match tidyOption "^clean" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match tidyOption "^css-prefix" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match tidyOption "^doctype" contained
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
59 syn match tidyOption "^doctype-mode" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match tidyOption "^drop-empty-paras" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match tidyOption "^drop-font-tags" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match tidyOption "^drop-proprietary-attributes" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match tidyOption "^enclose-block-text" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match tidyOption "^enclose-text" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match tidyOption "^error-file" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match tidyOption "^escape-cdata" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match tidyOption "^fix-backslash" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match tidyOption "^fix-bad-comments" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match tidyOption "^fix-uri" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match tidyOption "^force-output" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match tidyOption "^gnu-emacs" contained
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
72 syn match tidyOption "^gnu-emacs-file" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match tidyOption "^hide-comments" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match tidyOption "^hide-endtags" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match tidyOption "^indent" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match tidyOption "^indent-attributes" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match tidyOption "^indent-cdata" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match tidyOption "^indent-spaces" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match tidyOption "^input-encoding" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match tidyOption "^input-xml" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match tidyOption "^join-classes" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match tidyOption "^join-styles" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match tidyOption "^keep-time" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match tidyOption "^language" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match tidyOption "^literal-attributes" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match tidyOption "^logical-emphasis" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match tidyOption "^lower-literals" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match tidyOption "^markup" contained
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
89 syn match tidyOption "^merge-divs" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match tidyOption "^ncr" contained
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
91 syn match tidyOption "^newline" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match tidyOption "^numeric-entities" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match tidyOption "^output-bom" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match tidyOption "^output-encoding" contained
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
95 syn match tidyOption "^output-file" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match tidyOption "^output-html" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn match tidyOption "^output-xhtml" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn match tidyOption "^output-xml" contained
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
99 syn match tidyOption "^punctuation-wrap" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match tidyOption "^quiet" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn match tidyOption "^quote-ampersand" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match tidyOption "^quote-marks" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn match tidyOption "^quote-nbsp" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match tidyOption "^raw" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match tidyOption "^repeated-attributes" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn match tidyOption "^replace-color" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn match tidyOption "^show-body-only" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match tidyOption "^show-errors" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn match tidyOption "^show-warnings" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn match tidyOption "^slide-style" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match tidyOption "^split" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn match tidyOption "^tab-size" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn match tidyOption "^tidy-mark" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn match tidyOption "^uppercase-attributes" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn match tidyOption "^uppercase-tags" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn match tidyOption "^word-2000" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn match tidyOption "^wrap" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn match tidyOption "^wrap-asp" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn match tidyOption "^wrap-attributes" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn match tidyOption "^wrap-jste" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn match tidyOption "^wrap-php" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn match tidyOption "^wrap-script-literals" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn match tidyOption "^wrap-sections" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn match tidyOption "^write-back" contained
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
125 syn match tidyOption "^vertical-space" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 syn match tidyNewTagOption "^new-blocklevel-tags" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn match tidyNewTagOption "^new-empty-tags" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn match tidyNewTagOption "^new-inline-tags" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 syn match tidyNewTagOption "^new-pre-tags" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 if version >= 508 || !exists("did_tidy_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 let did_tidy_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 HiLink tidyBoolean Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 HiLink tidyComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 HiLink tidyDelimiter Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 HiLink tidyDoctype Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 HiLink tidyEncoding Constant
548
f43150a669dc updated for version 7.0155
vimboss
parents: 36
diff changeset
147 HiLink tidyNewline Constant
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 HiLink tidyNewTagDelimiter Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 HiLink tidyNewTagOption Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 HiLink tidyNewTagValue Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 HiLink tidyNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 HiLink tidyOption Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 HiLink tidyRepeat Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 HiLink tidyString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 HiLink tidyTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 let b:current_syntax = "tidy"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 " vim: ts=8