blob: 8178d02bad69c88c113157156594a7f030d8064f [file] [log] [blame]
Bram Moolenaar9d98fe92013-08-03 18:35:36 +02001" Vim syntax file
2" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
3" Maintainer: Doug Kearns <dougkearns@gmail.com>
Bram Moolenaard899e512022-05-07 21:54:03 +01004" Last Change: 2022 Apr 28
5
6" GNU Wget 1.21 built on linux-gnu.
Bram Moolenaar071d4272004-06-13 20:20:40 +00007
Bram Moolenaar9d98fe92013-08-03 18:35:36 +02008if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00009 finish
10endif
11
Bram Moolenaar9d98fe92013-08-03 18:35:36 +020012let s:cpo_save = &cpo
13set cpo&vim
14
15syn match wgetComment "#.*$" contains=wgetTodo contained
Bram Moolenaar071d4272004-06-13 20:20:40 +000016
Bram Moolenaar02743632005-07-25 20:42:36 +000017syn keyword wgetTodo TODO NOTE FIXME XXX contained
Bram Moolenaar071d4272004-06-13 20:20:40 +000018
Bram Moolenaar9d98fe92013-08-03 18:35:36 +020019syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
20syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
Bram Moolenaar071d4272004-06-13 20:20:40 +000021
22syn case ignore
Bram Moolenaar071d4272004-06-13 20:20:40 +000023
Bram Moolenaard899e512022-05-07 21:54:03 +010024syn keyword wgetBoolean on off yes no contained
25syn keyword wgetNumber inf contained
26
27syn match wgetNumber "\<\d\+>" contained
28syn match wgetQuota "\<\d\+[kmgt]\>" contained
29syn match wgetTime "\<\d\+[smhdw]\>" contained
Bram Moolenaar9d98fe92013-08-03 18:35:36 +020030
31"{{{ Commands
Bram Moolenaard899e512022-05-07 21:54:03 +010032let 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
214EOL
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200215"}}}
Bram Moolenaar02743632005-07-25 20:42:36 +0000216
Bram Moolenaard899e512022-05-07 21:54:03 +0100217call map(s:commands, "substitute(v:val, '_', '[-_]\\\\=', 'g')")
218
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200219for cmd in s:commands
Bram Moolenaard899e512022-05-07 21:54:03 +0100220 exe 'syn match wgetCommand "\<' . cmd . '\>" nextgroup=wgetAssignmentOperator skipwhite contained'
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200221endfor
Bram Moolenaard899e512022-05-07 21:54:03 +0100222
Bram Moolenaar071d4272004-06-13 20:20:40 +0000223syn case match
224
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200225syn match wgetStart "^" nextgroup=wgetCommand,wgetComment skipwhite
226syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained
Bram Moolenaar071d4272004-06-13 20:20:40 +0000227
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200228hi def link wgetAssignmentOperator Special
229hi def link wgetBoolean Boolean
230hi def link wgetCommand Identifier
231hi def link wgetComment Comment
232hi def link wgetNumber Number
233hi def link wgetQuota Number
234hi def link wgetString String
Bram Moolenaard899e512022-05-07 21:54:03 +0100235hi def link wgetTime Number
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200236hi def link wgetTodo Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +0000237
238let b:current_syntax = "wget"
Bram Moolenaar02743632005-07-25 20:42:36 +0000239
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200240let &cpo = s:cpo_save
241unlet s:cpo_save
242
243" vim: ts=8 fdm=marker: