5277
|
1 " Vim syntax file
|
|
2 " Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
|
|
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
|
|
4 " Last Change: 2013 Jun 1
|
7
|
5
|
5277
|
6 if exists("b:current_syntax")
|
7
|
7 finish
|
|
8 endif
|
|
9
|
5277
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
|
13 syn match wgetComment "#.*$" contains=wgetTodo contained
|
7
|
14
|
444
|
15 syn keyword wgetTodo TODO NOTE FIXME XXX contained
|
7
|
16
|
5277
|
17 syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
|
|
18 syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
|
444
|
19
|
7
|
20 syn case ignore
|
5277
|
21 syn keyword wgetBoolean on off contained
|
|
22 syn keyword wgetNumber inf contained
|
7
|
23 syn case match
|
|
24
|
5277
|
25 syn match wgetNumber "\<\%(\d\+\|inf\)\>" contained
|
|
26 syn match wgetQuota "\<\d\+[kKmM]\>" contained
|
|
27 syn match wgetTime "\<\d\+[smhdw]\>" contained
|
7
|
28
|
5277
|
29 "{{{ Commands
|
|
30 let 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 "}}}
|
7
|
165
|
5277
|
166 syn case ignore
|
|
167 for cmd in s:commands
|
|
168 exe 'syn match wgetCommand "' . cmd . '" nextgroup=wgetAssignmentOperator skipwhite contained'
|
|
169 endfor
|
|
170 syn case match
|
|
171
|
|
172 syn match wgetStart "^" nextgroup=wgetCommand,wgetComment skipwhite
|
|
173 syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained
|
|
174
|
|
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
|
7
|
183
|
|
184 let b:current_syntax = "wget"
|
444
|
185
|
5277
|
186 let &cpo = s:cpo_save
|
|
187 unlet s:cpo_save
|
|
188
|
|
189 " vim: ts=8 fdm=marker:
|