5277
|
1 " Vim syntax file
|
|
2 " Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
|
|
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
|
28777
|
4 " Last Change: 2022 Apr 28
|
|
5
|
|
6 " GNU Wget 1.21 built on linux-gnu.
|
7
|
7
|
5277
|
8 if exists("b:current_syntax")
|
7
|
9 finish
|
|
10 endif
|
|
11
|
5277
|
12 let s:cpo_save = &cpo
|
|
13 set cpo&vim
|
|
14
|
|
15 syn match wgetComment "#.*$" contains=wgetTodo contained
|
7
|
16
|
444
|
17 syn keyword wgetTodo TODO NOTE FIXME XXX contained
|
7
|
18
|
5277
|
19 syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
|
|
20 syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
|
444
|
21
|
7
|
22 syn case ignore
|
28777
|
23
|
|
24 syn keyword wgetBoolean on off yes no contained
|
|
25 syn keyword wgetNumber inf contained
|
7
|
26
|
28777
|
27 syn match wgetNumber "\<\d\+>" contained
|
|
28 syn match wgetQuota "\<\d\+[kmgt]\>" contained
|
|
29 syn match wgetTime "\<\d\+[smhdw]\>" contained
|
7
|
30
|
5277
|
31 "{{{ Commands
|
28777
|
32 let s:commands =<< trim EOL
|
|
33 accept
|
|
34 accept_regex
|
|
35 add_host_dir
|
|
36 adjust_extension
|
|
37 always_rest
|
|
38 ask_password
|
|
39 auth_no_challenge
|
|
40 background
|
|
41 backup_converted
|
|
42 backups
|
|
43 base
|
|
44 bind_address
|
|
45 bind_dns_address
|
|
46 body_data
|
|
47 body_file
|
|
48 ca_certificate
|
|
49 ca_directory
|
|
50 cache
|
|
51 certificate
|
|
52 certificate_type
|
|
53 check_certificate
|
|
54 choose_config
|
|
55 ciphers
|
|
56 compression
|
|
57 connect_timeout
|
|
58 content_disposition
|
|
59 content_on_error
|
|
60 continue
|
|
61 convert_file_only
|
|
62 convert_links
|
|
63 cookies
|
|
64 crl_file
|
|
65 cut_dirs
|
|
66 debug
|
|
67 default_page
|
|
68 delete_after
|
|
69 dns_cache
|
|
70 dns_servers
|
|
71 dns_timeout
|
|
72 dir_prefix
|
|
73 dir_struct
|
|
74 domains
|
|
75 dot_bytes
|
|
76 dots_in_line
|
|
77 dot_spacing
|
|
78 dot_style
|
|
79 egd_file
|
|
80 exclude_directories
|
|
81 exclude_domains
|
|
82 follow_ftp
|
|
83 follow_tags
|
|
84 force_html
|
|
85 ftp_passwd
|
|
86 ftp_password
|
|
87 ftp_user
|
|
88 ftp_proxy
|
|
89 ftps_clear_data_connection
|
|
90 ftps_fallback_to_ftp
|
|
91 ftps_implicit
|
|
92 ftps_resume_ssl
|
|
93 hsts
|
|
94 hsts_file
|
|
95 ftp_stmlf
|
|
96 glob
|
|
97 header
|
|
98 html_extension
|
|
99 htmlify
|
|
100 http_keep_alive
|
|
101 http_passwd
|
|
102 http_password
|
|
103 http_proxy
|
|
104 https_proxy
|
|
105 https_only
|
|
106 http_user
|
|
107 if_modified_since
|
|
108 ignore_case
|
|
109 ignore_length
|
|
110 ignore_tags
|
|
111 include_directories
|
|
112 inet4_only
|
|
113 inet6_only
|
|
114 input
|
|
115 input_meta_link
|
|
116 iri
|
|
117 keep_bad_hash
|
|
118 keep_session_cookies
|
|
119 kill_longer
|
|
120 limit_rate
|
|
121 load_cookies
|
|
122 locale
|
|
123 local_encoding
|
|
124 logfile
|
|
125 login
|
|
126 max_redirect
|
|
127 metalink_index
|
|
128 metalink_over_http
|
|
129 method
|
|
130 mirror
|
|
131 netrc
|
|
132 no_clobber
|
|
133 no_config
|
|
134 no_parent
|
|
135 no_proxy
|
|
136 numtries
|
|
137 output_document
|
|
138 page_requisites
|
|
139 passive_ftp
|
|
140 passwd
|
|
141 password
|
|
142 pinned_pubkey
|
|
143 post_data
|
|
144 post_file
|
|
145 prefer_family
|
|
146 preferred_location
|
|
147 preserve_permissions
|
|
148 private_key
|
|
149 private_key_type
|
|
150 progress
|
|
151 protocol_directories
|
|
152 proxy_passwd
|
|
153 proxy_password
|
|
154 proxy_user
|
|
155 quiet
|
|
156 quota
|
|
157 random_file
|
|
158 random_wait
|
|
159 read_timeout
|
|
160 rec_level
|
|
161 recursive
|
|
162 referer
|
|
163 regex_type
|
|
164 reject
|
|
165 rejected_log
|
|
166 reject_regex
|
|
167 relative_only
|
|
168 remote_encoding
|
|
169 remove_listing
|
|
170 report_speed
|
|
171 restrict_file_names
|
|
172 retr_symlinks
|
|
173 retry_connrefused
|
|
174 retry_on_host_error
|
|
175 retry_on_http_error
|
|
176 robots
|
|
177 save_cookies
|
|
178 save_headers
|
|
179 secure_protocol
|
|
180 server_response
|
|
181 show_all_dns_entries
|
|
182 show_progress
|
|
183 simple_host_check
|
|
184 span_hosts
|
|
185 spider
|
|
186 start_pos
|
|
187 strict_comments
|
|
188 sslcertfile
|
|
189 sslcertkey
|
|
190 timeout
|
|
191 timestamping
|
|
192 use_server_timestamps
|
|
193 tries
|
|
194 trust_server_names
|
|
195 unlink
|
|
196 use_askpass
|
|
197 user
|
|
198 use_proxy
|
|
199 user_agent
|
|
200 verbose
|
|
201 wait
|
|
202 wait_retry
|
|
203 warc_cdx
|
|
204 warc_cdx_dedup
|
|
205 warc_compression
|
|
206 warc_digests
|
|
207 warc_file
|
|
208 warc_header
|
|
209 warc_keep_log
|
|
210 warc_max_size
|
|
211 warc_temp_dir
|
|
212 wdebug
|
|
213 xattr
|
|
214 EOL
|
5277
|
215 "}}}
|
7
|
216
|
28777
|
217 call map(s:commands, "substitute(v:val, '_', '[-_]\\\\=', 'g')")
|
|
218
|
5277
|
219 for cmd in s:commands
|
28777
|
220 exe 'syn match wgetCommand "\<' . cmd . '\>" nextgroup=wgetAssignmentOperator skipwhite contained'
|
5277
|
221 endfor
|
28777
|
222
|
5277
|
223 syn case match
|
|
224
|
|
225 syn match wgetStart "^" nextgroup=wgetCommand,wgetComment skipwhite
|
|
226 syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained
|
|
227
|
|
228 hi def link wgetAssignmentOperator Special
|
|
229 hi def link wgetBoolean Boolean
|
|
230 hi def link wgetCommand Identifier
|
|
231 hi def link wgetComment Comment
|
|
232 hi def link wgetNumber Number
|
|
233 hi def link wgetQuota Number
|
|
234 hi def link wgetString String
|
28777
|
235 hi def link wgetTime Number
|
5277
|
236 hi def link wgetTodo Todo
|
7
|
237
|
|
238 let b:current_syntax = "wget"
|
444
|
239
|
5277
|
240 let &cpo = s:cpo_save
|
|
241 unlet s:cpo_save
|
|
242
|
|
243 " vim: ts=8 fdm=marker:
|