blob: 93206c200501409517e7b80afcd59a9cee3627b9 [file] [log] [blame]
Bram Moolenaar9d98fe92013-08-03 18:35:36 +02001" Vim syntax file
dkearnsd56f15c2023-11-09 06:53:20 +11002" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
Bram Moolenaar9d98fe92013-08-03 18:35:36 +02003" Maintainer: Doug Kearns <dougkearns@gmail.com>
dkearnsd56f15c2023-11-09 06:53:20 +11004" Last Change: 2023 Nov 05
Bram Moolenaard899e512022-05-07 21:54:03 +01005
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
dkearnsd56f15c2023-11-09 06:53:20 +110015syn 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
dkearnsd56f15c2023-11-09 06:53:20 +110024syn keyword wgetBoolean on off yes no contained
25syn keyword wgetNumber inf contained
26syn match wgetNumber "\<\d\+>" contained
27syn match wgetQuota "\<\d\+[kmgt]\>" contained
28syn match wgetTime "\<\d\+[smhdw]\>" contained
Bram Moolenaar9d98fe92013-08-03 18:35:36 +020029
30"{{{ Commands
Bram Moolenaard899e512022-05-07 21:54:03 +010031let s:commands =<< trim EOL
32 accept
dkearnsd56f15c2023-11-09 06:53:20 +110033 accept-regex
34 add-host-dir
35 adjust-extension
36 always-rest
37 ask-password
38 auth-no-challenge
Bram Moolenaard899e512022-05-07 21:54:03 +010039 background
dkearnsd56f15c2023-11-09 06:53:20 +110040 backup-converted
Bram Moolenaard899e512022-05-07 21:54:03 +010041 backups
42 base
dkearnsd56f15c2023-11-09 06:53:20 +110043 bind-address
44 bind-dns-address
45 body-data
46 body-file
47 ca-certificate
48 ca-directory
Bram Moolenaard899e512022-05-07 21:54:03 +010049 cache
50 certificate
dkearnsd56f15c2023-11-09 06:53:20 +110051 certificate-type
52 check-certificate
53 choose-config
Bram Moolenaard899e512022-05-07 21:54:03 +010054 ciphers
55 compression
dkearnsd56f15c2023-11-09 06:53:20 +110056 connect-timeout
57 content-disposition
58 content-on-error
Bram Moolenaard899e512022-05-07 21:54:03 +010059 continue
dkearnsd56f15c2023-11-09 06:53:20 +110060 convert-file-only
61 convert-links
Bram Moolenaard899e512022-05-07 21:54:03 +010062 cookies
dkearnsd56f15c2023-11-09 06:53:20 +110063 crl-file
64 cut-dirs
Bram Moolenaard899e512022-05-07 21:54:03 +010065 debug
dkearnsd56f15c2023-11-09 06:53:20 +110066 default-page
67 delete-after
68 dns-cache
69 dns-servers
70 dns-timeout
71 dir-prefix
72 dir-struct
Bram Moolenaard899e512022-05-07 21:54:03 +010073 domains
dkearnsd56f15c2023-11-09 06:53:20 +110074 dot-bytes
75 dots-in-line
76 dot-spacing
77 dot-style
78 egd-file
79 exclude-directories
80 exclude-domains
81 follow-ftp
82 follow-tags
83 force-html
84 ftp-passwd
85 ftp-password
86 ftp-user
87 ftp-proxy
88 ftps-clear-data-connection
89 ftps-fallback-to-ftp
90 ftps-implicit
91 ftps-resume-ssl
Bram Moolenaard899e512022-05-07 21:54:03 +010092 hsts
dkearnsd56f15c2023-11-09 06:53:20 +110093 hsts-file
94 ftp-stmlf
Bram Moolenaard899e512022-05-07 21:54:03 +010095 glob
96 header
dkearnsd56f15c2023-11-09 06:53:20 +110097 html-extension
Bram Moolenaard899e512022-05-07 21:54:03 +010098 htmlify
dkearnsd56f15c2023-11-09 06:53:20 +110099 http-keep-alive
100 http-passwd
101 http-password
102 http-proxy
103 https-proxy
104 https-only
105 http-user
106 if-modified-since
107 ignore-case
108 ignore-length
109 ignore-tags
110 include-directories
111 inet4-only
112 inet6-only
Bram Moolenaard899e512022-05-07 21:54:03 +0100113 input
dkearnsd56f15c2023-11-09 06:53:20 +1100114 input-meta-link
Bram Moolenaard899e512022-05-07 21:54:03 +0100115 iri
dkearnsd56f15c2023-11-09 06:53:20 +1100116 keep-bad-hash
117 keep-session-cookies
118 kill-longer
119 limit-rate
120 load-cookies
Bram Moolenaard899e512022-05-07 21:54:03 +0100121 locale
dkearnsd56f15c2023-11-09 06:53:20 +1100122 local-encoding
Bram Moolenaard899e512022-05-07 21:54:03 +0100123 logfile
124 login
dkearnsd56f15c2023-11-09 06:53:20 +1100125 max-redirect
126 metalink-index
127 metalink-over-http
Bram Moolenaard899e512022-05-07 21:54:03 +0100128 method
129 mirror
130 netrc
dkearnsd56f15c2023-11-09 06:53:20 +1100131 no-clobber
132 no-config
133 no-parent
134 no-proxy
Bram Moolenaard899e512022-05-07 21:54:03 +0100135 numtries
dkearnsd56f15c2023-11-09 06:53:20 +1100136 output-document
137 page-requisites
138 passive-ftp
Bram Moolenaard899e512022-05-07 21:54:03 +0100139 passwd
140 password
dkearnsd56f15c2023-11-09 06:53:20 +1100141 pinned-pubkey
142 post-data
143 post-file
144 prefer-family
145 preferred-location
146 preserve-permissions
147 private-key
148 private-key-type
Bram Moolenaard899e512022-05-07 21:54:03 +0100149 progress
dkearnsd56f15c2023-11-09 06:53:20 +1100150 protocol-directories
151 proxy-passwd
152 proxy-password
153 proxy-user
Bram Moolenaard899e512022-05-07 21:54:03 +0100154 quiet
155 quota
dkearnsd56f15c2023-11-09 06:53:20 +1100156 random-file
157 random-wait
158 read-timeout
159 rec-level
Bram Moolenaard899e512022-05-07 21:54:03 +0100160 recursive
161 referer
dkearnsd56f15c2023-11-09 06:53:20 +1100162 regex-type
Bram Moolenaard899e512022-05-07 21:54:03 +0100163 reject
dkearnsd56f15c2023-11-09 06:53:20 +1100164 rejected-log
165 reject-regex
166 relative-only
167 remote-encoding
168 remove-listing
169 report-speed
170 restrict-file-names
171 retr-symlinks
172 retry-connrefused
173 retry-on-host-error
174 retry-on-http-error
Bram Moolenaard899e512022-05-07 21:54:03 +0100175 robots
dkearnsd56f15c2023-11-09 06:53:20 +1100176 save-cookies
177 save-headers
178 secure-protocol
179 server-response
180 show-all-dns-entries
181 show-progress
182 simple-host-check
183 span-hosts
Bram Moolenaard899e512022-05-07 21:54:03 +0100184 spider
dkearnsd56f15c2023-11-09 06:53:20 +1100185 start-pos
186 strict-comments
Bram Moolenaard899e512022-05-07 21:54:03 +0100187 sslcertfile
188 sslcertkey
189 timeout
190 timestamping
dkearnsd56f15c2023-11-09 06:53:20 +1100191 use-server-timestamps
Bram Moolenaard899e512022-05-07 21:54:03 +0100192 tries
dkearnsd56f15c2023-11-09 06:53:20 +1100193 trust-server-names
Bram Moolenaard899e512022-05-07 21:54:03 +0100194 unlink
dkearnsd56f15c2023-11-09 06:53:20 +1100195 use-askpass
Bram Moolenaard899e512022-05-07 21:54:03 +0100196 user
dkearnsd56f15c2023-11-09 06:53:20 +1100197 use-proxy
198 user-agent
Bram Moolenaard899e512022-05-07 21:54:03 +0100199 verbose
200 wait
dkearnsd56f15c2023-11-09 06:53:20 +1100201 wait-retry
202 warc-cdx
203 warc-cdx-dedup
204 warc-compression
205 warc-digests
206 warc-file
207 warc-header
208 warc-keep-log
209 warc-max-size
210 warc-temp-dir
Bram Moolenaard899e512022-05-07 21:54:03 +0100211 wdebug
212 xattr
213EOL
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200214"}}}
Bram Moolenaar02743632005-07-25 20:42:36 +0000215
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200216for cmd in s:commands
dkearnsd56f15c2023-11-09 06:53:20 +1100217 exe 'syn match wgetCommand "\<' .. substitute(cmd, '-', '[-_]\\=', "g") .. '\>" nextgroup=wgetAssignmentOperator skipwhite contained'
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200218endfor
dkearnsd56f15c2023-11-09 06:53:20 +1100219unlet s:commands
Bram Moolenaard899e512022-05-07 21:54:03 +0100220
Bram Moolenaar071d4272004-06-13 20:20:40 +0000221syn case match
222
dkearnsd56f15c2023-11-09 06:53:20 +1100223syn match wgetLineStart "^" nextgroup=wgetCommand,wgetComment skipwhite
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200224syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained
Bram Moolenaar071d4272004-06-13 20:20:40 +0000225
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200226hi def link wgetAssignmentOperator Special
227hi def link wgetBoolean Boolean
228hi def link wgetCommand Identifier
229hi def link wgetComment Comment
230hi def link wgetNumber Number
231hi def link wgetQuota Number
232hi def link wgetString String
Bram Moolenaard899e512022-05-07 21:54:03 +0100233hi def link wgetTime Number
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200234hi def link wgetTodo Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +0000235
236let b:current_syntax = "wget"
Bram Moolenaar02743632005-07-25 20:42:36 +0000237
Bram Moolenaar9d98fe92013-08-03 18:35:36 +0200238let &cpo = s:cpo_save
239unlet s:cpo_save
240
241" vim: ts=8 fdm=marker: