2 " Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
4 " Last Change: 2013 Jun 1
6 if exists("b:current_syntax")
13 syn match wgetComment "#.*$" contains=wgetTodo contained
15 syn keyword wgetTodo TODO NOTE FIXME XXX contained
17 syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
18 syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
21 syn keyword wgetBoolean on off contained
22 syn keyword wgetNumber inf contained
25 syn match wgetNumber "\<\%(\d\+\|inf\)\>" contained
26 syn match wgetQuota "\<\d\+[kKmM]\>" contained
27 syn match wgetTime "\<\d\+[smhdw]\>" contained
30 let s:commands = map([
36 \ "auth_no_challenge",
47 \ "check_certificate",
49 \ "content_disposition",
67 \ "exclude_directories",
89 \ "include_directories",
94 \ "keep_session_cookies",
117 \ "preserve_permissions",
119 \ "private_key_type",
121 \ "protocol_directories",
137 \ "restrict_file_names",
139 \ "retry_connrefused",
145 \ "show_all_dns_entries",
146 \ "simple_host_check",
154 \ "use_server_timestamps",
156 \ "trust_server_names",
163 \ "substitute(v:val, '_', '[-_]\\\\=', 'g')")
167 for cmd in s:commands
168 exe 'syn match wgetCommand "' . cmd . '" nextgroup=wgetAssignmentOperator skipwhite contained'
172 syn match wgetStart "^" nextgroup=wgetCommand,wgetComment skipwhite
173 syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained
175 hi def link wgetAssignmentOperator Special
176 hi def link wgetBoolean Boolean
177 hi def link wgetCommand Identifier
178 hi def link wgetComment Comment
179 hi def link wgetNumber Number
180 hi def link wgetQuota Number
181 hi def link wgetString String
182 hi def link wgetTodo Todo
184 let b:current_syntax = "wget"
186 let &cpo = s:cpo_save
189 " vim: ts=8 fdm=marker: