xref: /vim-8.2.3635/runtime/syntax/wget.vim (revision 9d98fe9c)
1" Vim syntax file
2" Language:     Wget configuration file (/etc/wgetrc ~/.wgetrc)
3" Maintainer:	Doug Kearns <[email protected]>
4" Last Change:	2013 Jun 1
5
6if exists("b:current_syntax")
7  finish
8endif
9
10let s:cpo_save = &cpo
11set cpo&vim
12
13syn match wgetComment "#.*$" contains=wgetTodo contained
14
15syn keyword wgetTodo TODO NOTE FIXME XXX contained
16
17syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
18syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
19
20syn case ignore
21syn keyword wgetBoolean on off contained
22syn keyword wgetNumber  inf    contained
23syn case match
24
25syn match wgetNumber "\<\%(\d\+\|inf\)\>" contained
26syn match wgetQuota  "\<\d\+[kKmM]\>"     contained
27syn match wgetTime   "\<\d\+[smhdw]\>"    contained
28
29"{{{ Commands
30let s:commands = map([
31        \ "accept",
32	\ "add_hostdir",
33	\ "adjust_extension",
34	\ "always_rest",
35	\ "ask_password",
36	\ "auth_no_challenge",
37	\ "background",
38	\ "backup_converted",
39	\ "backups",
40	\ "base",
41	\ "bind_address",
42	\ "ca_certificate",
43	\ "ca_directory",
44	\ "cache",
45	\ "certificate",
46	\ "certificate_type",
47	\ "check_certificate",
48	\ "connect_timeout",
49	\ "content_disposition",
50	\ "continue",
51	\ "convert_links",
52	\ "cookies",
53	\ "cut_dirs",
54	\ "debug",
55	\ "default_page",
56	\ "delete_after",
57	\ "dns_cache",
58	\ "dns_timeout",
59	\ "dir_prefix",
60	\ "dir_struct",
61	\ "domains",
62	\ "dot_bytes",
63	\ "dots_in_line",
64	\ "dot_spacing",
65	\ "dot_style",
66	\ "egd_file",
67	\ "exclude_directories",
68	\ "exclude_domains",
69	\ "follow_ftp",
70	\ "follow_tags",
71	\ "force_html",
72	\ "ftp_passwd",
73	\ "ftp_password",
74	\ "ftp_user",
75	\ "ftp_proxy",
76	\ "glob",
77	\ "header",
78	\ "html_extension",
79	\ "htmlify",
80	\ "http_keep_alive",
81	\ "http_passwd",
82	\ "http_password",
83	\ "http_proxy",
84	\ "https_proxy",
85	\ "http_user",
86	\ "ignore_case",
87	\ "ignore_length",
88	\ "ignore_tags",
89	\ "include_directories",
90	\ "inet4_only",
91	\ "inet6_only",
92	\ "input",
93	\ "iri",
94	\ "keep_session_cookies",
95	\ "kill_longer",
96	\ "limit_rate",
97	\ "load_cookies",
98	\ "locale",
99	\ "local_encoding",
100	\ "logfile",
101	\ "login",
102	\ "max_redirect",
103	\ "mirror",
104	\ "netrc",
105	\ "no_clobber",
106	\ "no_parent",
107	\ "no_proxy",
108	\ "numtries",
109	\ "output_document",
110	\ "page_requisites",
111	\ "passive_ftp",
112	\ "passwd",
113	\ "password",
114	\ "post_data",
115	\ "post_file",
116	\ "prefer_family",
117	\ "preserve_permissions",
118	\ "private_key",
119	\ "private_key_type",
120	\ "progress",
121	\ "protocol_directories",
122	\ "proxy_passwd",
123	\ "proxy_password",
124	\ "proxy_user",
125	\ "quiet",
126	\ "quota",
127	\ "random_file",
128	\ "random_wait",
129	\ "read_timeout",
130	\ "reclevel",
131	\ "recursive",
132	\ "referer",
133	\ "reject",
134	\ "relative_only",
135	\ "remote_encoding",
136	\ "remove_listing",
137	\ "restrict_file_names",
138	\ "retr_symlinks",
139	\ "retry_connrefused",
140	\ "robots",
141	\ "save_cookies",
142	\ "save_headers",
143	\ "secure_protocol",
144	\ "server_response",
145	\ "show_all_dns_entries",
146	\ "simple_host_check",
147	\ "span_hosts",
148	\ "spider",
149	\ "strict_comments",
150	\ "sslcertfile",
151	\ "sslcertkey",
152	\ "timeout",
153	\ "time_stamping",
154	\ "use_server_timestamps",
155	\ "tries",
156	\ "trust_server_names",
157	\ "user",
158	\ "use_proxy",
159	\ "user_agent",
160	\ "verbose",
161	\ "wait",
162	\ "wait_retry"],
163	\ "substitute(v:val, '_', '[-_]\\\\=', 'g')")
164"}}}
165
166syn case ignore
167for cmd in s:commands
168  exe 'syn match wgetCommand "' . cmd . '" nextgroup=wgetAssignmentOperator skipwhite contained'
169endfor
170syn case match
171
172syn match wgetStart "^" nextgroup=wgetCommand,wgetComment skipwhite
173syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained
174
175hi def link wgetAssignmentOperator Special
176hi def link wgetBoolean		   Boolean
177hi def link wgetCommand		   Identifier
178hi def link wgetComment		   Comment
179hi def link wgetNumber		   Number
180hi def link wgetQuota		   Number
181hi def link wgetString		   String
182hi def link wgetTodo		   Todo
183
184let b:current_syntax = "wget"
185
186let &cpo = s:cpo_save
187unlet s:cpo_save
188
189" vim: ts=8 fdm=marker:
190