summaryrefslogtreecommitdiff
path: root/.vim/syntax/lighttpd.vim
blob: 92c7baff857aed3cead6e428bb56290a59437ccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
" Vim syntax file
" Language:     lighttpd config, http://www.lighttpd.net/
" URL:          http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/vim-syntax-lighttpd/lighttpd.vim
" Version Info: $Revision: 1.16 $
" Maintainer:   Elan Ruusamäe <glen@pld-linux.org>
" Last Change:  $Date: 2009/11/09 12:52:16 $ UTC

" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
  syntax clear
elseif exists("b:current_syntax")
  finish
endif

syn case match

if version < 600
	set iskeyword+=.,-
else
	setlocal iskeyword+=.,-
endif

" define the lighttpd syntax
" see also http://redmine.lighttpd.net/wiki/lighttpd/Docs:Configuration
syn match   lighttpdDelimiter   "[{}()\[\];,]"
syn match   lighttpdOperator    "[~!=|&\*\+\<\>]"
syn match   lighttpdComment     "\(#.*\)"
syn match   lighttpdNumber      "[-+]\=\<\d\+\(\.\d*\)\=\>"
syn region  lighttpdString      start=+"+ skip=+\\"+ end=+"+
syn keyword lighttpdConditional else
syn match   lighttpdServerVar   /\$\(HTTP\|SERVER\|PHYSICAL\)\>/
syn match   lighttpdFunction    /"\(cookie\|host\|useragent\|referer\|url\|querystring\|remoteip\|scheme\|socket\|path\|existing-path\)"/

" internal keywords
syn keyword lighttpdKeyword   include include_shell

syn match   lighttpdSpecial   /"\(dis\|en\)able"/

" module options
syn match   lighttpdOption   /var\.[A-Za-z][_A-Za-z0-9]*/
syn keyword lighttpdOption
	\ accesslog.filename
	\ accesslog.format
	\ accesslog.use-syslog
	\ alias.url
	\ auth.backend
	\ auth.backend.htdigest.userfile
	\ auth.backend.htpasswd.userfile
	\ auth.backend.ldap.allow-empty-pw
	\ auth.backend.ldap.base-dn
	\ auth.backend.ldap.bind-dn
	\ auth.backend.ldap.bind-pw
	\ auth.backend.ldap.ca-file
	\ auth.backend.ldap.filter
	\ auth.backend.ldap.hostname
	\ auth.backend.ldap.starttls
	\ auth.backend.plain.groupfile
	\ auth.backend.plain.userfile
	\ auth.debug
	\ auth.require
	\ cgi.assign
	\ cgi.execute-x-only
	\ cml.extension
	\ cml.memcache-hosts
	\ cml.memcache-namespace
	\ cml.power-magnet
	\ compress.allowed-encodings
	\ compress.cache-dir
	\ compress.filetype
	\ compress.max-filesize
	\ connection.kbytes-per-second
	\ debug.log-condition-handling
	\ debug.log-file-not-found
	\ debug.log-request-handling
	\ debug.log-request-header
	\ debug.log-request-header-on-error
	\ debug.log-response-header
	\ debug.log-ssl-noise
	\ debug.log-state-handling
	\ debug.log-timeouts
	\ dir-listing.activate
	\ dir-listing.auto-layout
	\ dir-listing.encode-header
	\ dir-listing.encode-readme
	\ dir-listing.encoding
	\ dir-listing.exclude
	\ dir-listing.external-css
	\ dir-listing.hide-dotfiles
	\ dir-listing.hide-header-file
	\ dir-listing.hide-readme-file
	\ dir-listing.set-footer
	\ dir-listing.show-header
	\ dir-listing.show-readme
	\ etag.use-inode
	\ etag.use-mtime
	\ etag.use-size
	\ evasive.http-status-code
	\ evasive.max-conns-per-ip
	\ evasive.retry-after
	\ evasive.silent
	\ evhost.path-pattern
	\ expire.url
	\ extforward.forwarder
	\ extforward.headers
	\ fastcgi.debug
	\ fastcgi.map-extensions
	\ fastcgi.server
	\ flv-streaming.extensions
	\ h264-streaming.extensions
	\ index-file.names
	\ mimetype.assign
	\ mimetype.use-xattr
	\ proxy.balance
	\ proxy.debug
	\ proxy.server
	\ rrdtool.binary
	\ rrdtool.db-name
	\ scgi.debug
	\ scgi.server
	\ secdownload.document-root
	\ secdownload.secret
	\ secdownload.timeout
	\ secdownload.uri-prefix
	\ server.bind
	\ server.breakagelog
	\ server.chroot
	\ server.core-files
	\ server.defer-accept
	\ server.dir-listing
	\ server.document-root
	\ server.errorfile-prefix
	\ server.error-handler-404
	\ server.errorlog
	\ server.errorlog-use-syslog
	\ server.event-handler
	\ server.follow-symlink
	\ server.force-lowercase-filenames
	\ server.groupname
	\ server.indexfiles
	\ server.kbytes-per-second
	\ server.max-connections
	\ server.max-fds
	\ server.max-keep-alive-idle
	\ server.max-keep-alive-requests
	\ server.max-read-idle
	\ server.max-request-size
	\ server.max-worker
	\ server.max-write-idle
	\ server.modules
	\ server.name
	\ server.network-backend
	\ server.pid-file
	\ server.port
	\ server.protocol-http11
	\ server.range-requests
	\ server.reject-expect-100-with-417
	\ server.stat-cache-engine
	\ server.tag
	\ server.upload-dirs
	\ server.use-ipv6
	\ server.username
	\ setenv.add-environment
	\ setenv.add-request-header
	\ setenv.add-response-header
	\ simple-vhost.debug
	\ simple-vhost.default-host
	\ simple-vhost.document-root
	\ simple-vhost.server-root
	\ ssi.content-type
	\ ssi.extension
	\ ssl.ca-file
	\ ssl.cipher-list
	\ ssl.engine
	\ ssl.pemfile
	\ ssl.use-sslv2
	\ ssl.verifyclient.activate
	\ ssl.verifyclient.depth
	\ ssl.verifyclient.enforce
	\ ssl.verifyclient.exportcert
	\ ssl.verifyclient.username
	\ static-file.etags
	\ static-file.exclude-extensions
	\ status.config-url
	\ status.enable-sort
	\ status.statistics-url
	\ status.status-url
	\ trigger-before-download.debug
	\ trigger-before-download.deny-url
	\ trigger-before-download.download-url
	\ trigger-before-download.gdbm-filename
	\ trigger-before-download.memcache-hosts
	\ trigger-before-download.memcache-namespace
	\ trigger-before-download.trigger-timeout
	\ trigger-before-download.trigger-url
	\ url.access-deny
	\ url.redirect
	\ url.rewrite
	\ url.rewrite-final
	\ url.rewrite-if-not-file
	\ url.rewrite-once
	\ url.rewrite-repeat
	\ url.rewrite-repeat-if-not-file
	\ userdir.basepath
	\ userdir.exclude-user
	\ userdir.include-user
	\ userdir.letterhomes
	\ userdir.path
	\ usertrack.cookie-domain
	\ usertrack.cookie-max-age
	\ usertrack.cookie-name
	\ webdav.activate
	\ webdav.is-readonly
	\ webdav.log-xml
	\ webdav.sqlite-db-name

" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_lighttpd_syntax_inits")
  if version < 508
    let did_lighttpd_syntax_inits = 1
    command -nargs=+ HiLink hi link <args>
  else
    command -nargs=+ HiLink hi def link <args>
  endif

  HiLink lighttpdDelimiter   Delimiter
  HiLink lighttpdOperator    Operator
  HiLink lighttpdComment     Comment
  HiLink lighttpdNumber      Number
  HiLink lighttpdFunction    Function
  HiLink lighttpdKeyword     Keyword
  HiLink lighttpdOption      Identifier
  HiLink lighttpdSpecial     Special
  HiLink lighttpdConditional Conditional
  HiLink lighttpdString      String
  HiLink lighttpdServerVar   Identifier

  delcommand HiLink
endif

let b:current_syntax = "lighttpd"

" vim: ts=4