xref: /vim-8.2.3635/runtime/syntax/wget.vim (revision 044b68f4)
1" Wget syntax file
2" Filename:     wget.vim
3" Language:     Wget configuration file ( /etc/wgetrc ~/.wgetrc )
4" Maintainer:   Doug Kearns <[email protected]>
5" URL:          http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/wget.vim
6" Last Change:  2005 Jul 24
7
8" TODO: all commands are actually underscore and hyphen insensitive, though
9"       they are normally named as listed below
10
11" For version 5.x: Clear all syntax items
12" For version 6.x: Quit when a syntax file was already loaded
13if version < 600
14  syntax clear
15elseif exists("b:current_syntax")
16  finish
17endif
18
19syn match   wgetComment "^\s*#.*$" contains=wgetTodo
20
21syn keyword wgetTodo TODO NOTE FIXME XXX contained
22
23syn match   wgetAssignment "^\s*[A-Za-z0-9_-]\+\s*=\s*.*$" contains=wgetCommand,wgetAssignmentOperator,wgetString,wgetBoolean,wgetNumber,wgetValue,wgetQuota,wgetRestriction,wgetTime
24
25syn match   wgetAssignmentOperator "=" contained
26
27syn region  wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
28syn region  wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
29
30" Note: make this a match so that always_rest matches properly
31syn case ignore
32syn match   wgetBoolean	"\<on\|off\|always\|never\|1\|0\>" contained
33syn case match
34
35syn match   wgetNumber	"\<\d\+\|inf\>"		contained
36syn match   wgetQuota	"\<\d\+[kKmM]\?\>"	contained
37syn match   wgetTime	"\<\d\+[smhdw]\>"	contained
38
39syn case ignore
40syn keyword wgetValue	default binary mega giga micro contained
41syn case match
42
43syn match   wgetRestriction  "\<\%(windows\|unix\)\%(,nocontrol\)\=\>"	contained
44syn match   wgetRestriction  "\<nocontrol\>"				contained
45
46syn case ignore
47syn match wgetCommand "^\s*accept" contained
48syn match wgetCommand "^\s*add[-_]\=hostdir" contained
49syn match wgetCommand "^\s*always[-_]\=rest" contained
50syn match wgetCommand "^\s*background" contained
51syn match wgetCommand "^\s*backup[-_]\=converted" contained
52syn match wgetCommand "^\s*backups" contained
53syn match wgetCommand "^\s*base" contained
54syn match wgetCommand "^\s*bind[-_]\=address" contained
55syn match wgetCommand "^\s*ca[-_]\=certificate" contained
56syn match wgetCommand "^\s*ca[-_]\=directory" contained
57syn match wgetCommand "^\s*cache" contained
58syn match wgetCommand "^\s*certificate" contained
59syn match wgetCommand "^\s*certificate[-_]\=type" contained
60syn match wgetCommand "^\s*check[-_]\=certificate" contained
61syn match wgetCommand "^\s*connect[-_]\=timeout" contained
62syn match wgetCommand "^\s*continue" contained
63syn match wgetCommand "^\s*convert[-_]\=links" contained
64syn match wgetCommand "^\s*cookies" contained
65syn match wgetCommand "^\s*cut[-_]\=dirs" contained
66syn match wgetCommand "^\s*debug" contained
67syn match wgetCommand "^\s*delete[-_]\=after" contained
68syn match wgetCommand "^\s*dns[-_]\=cache" contained
69syn match wgetCommand "^\s*dns[-_]\=timeout" contained
70syn match wgetCommand "^\s*dir[-_]\=prefix" contained
71syn match wgetCommand "^\s*dir[-_]\=struct" contained
72syn match wgetCommand "^\s*domains" contained
73syn match wgetCommand "^\s*dot[-_]\=bytes" contained
74syn match wgetCommand "^\s*dots[-_]\=in[-_]\=line" contained
75syn match wgetCommand "^\s*dot[-_]\=spacing" contained
76syn match wgetCommand "^\s*dot[-_]\=style" contained
77syn match wgetCommand "^\s*egd[-_]\=file" contained
78syn match wgetCommand "^\s*exclude[-_]\=directories" contained
79syn match wgetCommand "^\s*exclude[-_]\=domains" contained
80syn match wgetCommand "^\s*follow[-_]\=ftp" contained
81syn match wgetCommand "^\s*follow[-_]\=tags" contained
82syn match wgetCommand "^\s*force[-_]\=html" contained
83syn match wgetCommand "^\s*ftp[-_]\=passw\(or\)\=d" contained
84syn match wgetCommand "^\s*ftp[-_]\=user" contained
85syn match wgetCommand "^\s*ftp[-_]\=proxy" contained
86syn match wgetCommand "^\s*glob" contained
87syn match wgetCommand "^\s*header" contained
88syn match wgetCommand "^\s*html[-_]\=extension" contained
89syn match wgetCommand "^\s*htmlify" contained
90syn match wgetCommand "^\s*http[-_]\=keep[-_]\=alive" contained
91syn match wgetCommand "^\s*http[-_]\=passwd" contained
92syn match wgetCommand "^\s*http[-_]\=password" contained
93syn match wgetCommand "^\s*http[-_]\=proxy" contained
94syn match wgetCommand "^\s*https[-_]\=proxy" contained
95syn match wgetCommand "^\s*http[-_]\=user" contained
96syn match wgetCommand "^\s*ignore[-_]\=length" contained
97syn match wgetCommand "^\s*ignore[-_]\=tags" contained
98syn match wgetCommand "^\s*include[-_]\=directories" contained
99syn match wgetCommand "^\s*inet4[-_]\=only" contained
100syn match wgetCommand "^\s*inet6[-_]\=only" contained
101syn match wgetCommand "^\s*input" contained
102syn match wgetCommand "^\s*keep[-_]\=session[-_]\=cookies" contained
103syn match wgetCommand "^\s*kill[-_]\=longer" contained
104syn match wgetCommand "^\s*limit[-_]\=rate" contained
105syn match wgetCommand "^\s*load[-_]\=cookies" contained
106syn match wgetCommand "^\s*logfile" contained
107syn match wgetCommand "^\s*login" contained
108syn match wgetCommand "^\s*mirror" contained
109syn match wgetCommand "^\s*netrc" contained
110syn match wgetCommand "^\s*no[-_]\=clobber" contained
111syn match wgetCommand "^\s*no[-_]\=parent" contained
112syn match wgetCommand "^\s*no[-_]\=proxy" contained
113" Note: this option is deprecated, use 'tries' instead
114syn match wgetCommand "^\s*numtries" contained
115syn match wgetCommand "^\s*output[-_]\=document" contained
116syn match wgetCommand "^\s*page[-_]\=requisites" contained
117syn match wgetCommand "^\s*passive[-_]\=ftp" contained
118syn match wgetCommand "^\s*passwd" contained
119syn match wgetCommand "^\s*password" contained
120syn match wgetCommand "^\s*post[-_]\=data" contained
121syn match wgetCommand "^\s*post[-_]\=file" contained
122syn match wgetCommand "^\s*prefer[-_]\=family" contained
123syn match wgetCommand "^\s*preserve[-_]\=permissions" contained
124syn match wgetCommand "^\s*private[-_]\=key" contained
125syn match wgetCommand "^\s*private[-_]\=key[-_]\=type" contained
126syn match wgetCommand "^\s*progress" contained
127syn match wgetCommand "^\s*protocol[-_]\=directories" contained
128syn match wgetCommand "^\s*proxy[-_]\=passwd" contained
129syn match wgetCommand "^\s*proxy[-_]\=password" contained
130syn match wgetCommand "^\s*proxy[-_]\=user" contained
131syn match wgetCommand "^\s*quiet" contained
132syn match wgetCommand "^\s*quota" contained
133syn match wgetCommand "^\s*random[-_]\=file" contained
134syn match wgetCommand "^\s*random[-_]\=wait" contained
135syn match wgetCommand "^\s*read[-_]\=timeout" contained
136syn match wgetCommand "^\s*reclevel" contained
137syn match wgetCommand "^\s*recursive" contained
138syn match wgetCommand "^\s*referer" contained
139syn match wgetCommand "^\s*reject" contained
140syn match wgetCommand "^\s*relative[-_]\=only" contained
141syn match wgetCommand "^\s*remove[-_]\=listing" contained
142syn match wgetCommand "^\s*restrict[-_]\=file[-_]\=names" contained
143syn match wgetCommand "^\s*retr[-_]\=symlinks" contained
144syn match wgetCommand "^\s*retry[-_]\=connrefused" contained
145syn match wgetCommand "^\s*robots" contained
146syn match wgetCommand "^\s*save[-_]\=cookies" contained
147syn match wgetCommand "^\s*save[-_]\=headers" contained
148syn match wgetCommand "^\s*secure[-_]\=protocol" contained
149syn match wgetCommand "^\s*server[-_]\=response" contained
150" Note: this option was removed in wget 1.8
151syn match wgetCommand "^\s*simple[-_]\=host[-_]\=check" contained
152syn match wgetCommand "^\s*span[-_]\=hosts" contained
153syn match wgetCommand "^\s*spider" contained
154syn match wgetCommand "^\s*strict[-_]\=comments" contained
155syn match wgetCommand "^\s*sslcertfile" contained
156syn match wgetCommand "^\s*sslcertkey" contained
157syn match wgetCommand "^\s*timeout" contained
158syn match wgetCommand "^\s*time[-_]\=stamping" contained
159syn match wgetCommand "^\s*tries" contained
160syn match wgetCommand "^\s*user" contained
161syn match wgetCommand "^\s*use[-_]\=proxy" contained
162syn match wgetCommand "^\s*user[-_]\=agent" contained
163syn match wgetCommand "^\s*verbose" contained
164syn match wgetCommand "^\s*wait" contained
165syn match wgetCommand "^\s*wait[-_]\=retry" contained
166syn case match
167
168" Define the default highlighting.
169" For version 5.7 and earlier: only when not done already
170" For version 5.8 and later: only when an item doesn't have highlighting yet
171if version >= 508 || !exists("did_wget_syn_inits")
172  if version < 508
173    let did_wget_syn_inits = 1
174    command -nargs=+ HiLink hi link <args>
175  else
176    command -nargs=+ HiLink hi def link <args>
177  endif
178
179  HiLink wgetAssignmentOperator Special
180  HiLink wgetBoolean            Boolean
181  HiLink wgetCommand            Identifier
182  HiLink wgetComment            Comment
183  HiLink wgetNumber             Number
184  HiLink wgetQuota              Number
185  HiLink wgetString             String
186  HiLink wgetTodo               Todo
187  HiLink wgetValue              Constant
188
189  delcommand HiLink
190endif
191
192let b:current_syntax = "wget"
193
194" vim: ts=8
195