blob: 88df690793cdac6f95ca5c9b7ecb1c74b6acf98c [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Wget syntax file
2" Filename: wget.vim
3" Language: Wget configuration file ( /etc/wgetrc ~/.wgetrc )
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00004" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
5" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/wget.vim
6" Last Change: 2004 Nov 27
Bram Moolenaar071d4272004-06-13 20:20:40 +00007
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-z_-]\+\s*=\s*.*$" contains=wgetCommand,wgetAssignmentOperator,wgetString,wgetBoolean,wgetNumber,wgetValue,wgetQuota
24
25syn match wgetAssignmentOperator "=" contained
26
27syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
28syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
29
30" 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
36
37syn match wgetQuota "\<\d\+[kKmM]\?\>" contained
38
39syn case ignore
40syn keyword wgetValue default binary mega giga micro contained
41syn case match
42
43syn case ignore
44syn match wgetCommand "^\s*accept" contained
45syn match wgetCommand "^\s*add[-_]\=hostdir" contained
46syn match wgetCommand "^\s*always[-_]\=rest" contained
47syn match wgetCommand "^\s*background" contained
48syn match wgetCommand "^\s*backup[-_]\=converted" contained
49syn match wgetCommand "^\s*backups" contained
50syn match wgetCommand "^\s*base" contained
51syn match wgetCommand "^\s*bind[-_]\=address" contained
52syn match wgetCommand "^\s*cache" contained
53syn match wgetCommand "^\s*continue" contained
54syn match wgetCommand "^\s*convert[-_]\=links" contained
55syn match wgetCommand "^\s*cookies" contained
56syn match wgetCommand "^\s*cut[-_]\=dirs" contained
57syn match wgetCommand "^\s*debug" contained
58syn match wgetCommand "^\s*delete[-_]\=after" contained
59syn match wgetCommand "^\s*dir[-_]\=prefix" contained
60syn match wgetCommand "^\s*dir[-_]\=struct" contained
61syn match wgetCommand "^\s*domains" contained
62syn match wgetCommand "^\s*dot[-_]\=bytes" contained
63syn match wgetCommand "^\s*dots[-_]\=in[-_]\=line" contained
64syn match wgetCommand "^\s*dot[-_]\=spacing" contained
65syn match wgetCommand "^\s*dot[-_]\=style" contained
66syn match wgetCommand "^\s*egd[-_]\=file" contained
67syn match wgetCommand "^\s*exclude[-_]\=directories" contained
68syn match wgetCommand "^\s*exclude[-_]\=domains" contained
69syn match wgetCommand "^\s*follow[-_]\=ftp" contained
70syn match wgetCommand "^\s*follow[-_]\=tags" contained
71syn match wgetCommand "^\s*force[-_]\=html" contained
72syn match wgetCommand "^\s*ftp[-_]\=proxy" contained
73syn match wgetCommand "^\s*glob" contained
74syn match wgetCommand "^\s*header" contained
75syn match wgetCommand "^\s*html[-_]\=extension" contained
76syn match wgetCommand "^\s*htmlify" contained
77syn match wgetCommand "^\s*http[-_]\=keep[-_]\=alive" contained
78syn match wgetCommand "^\s*http[-_]\=passwd" contained
79syn match wgetCommand "^\s*http[-_]\=proxy" contained
80syn match wgetCommand "^\s*https[-_]\=proxy" contained
81syn match wgetCommand "^\s*http[-_]\=user" contained
82syn match wgetCommand "^\s*ignore[-_]\=length" contained
83syn match wgetCommand "^\s*ignore[-_]\=tags" contained
84syn match wgetCommand "^\s*include[-_]\=directories" contained
85syn match wgetCommand "^\s*input" contained
86syn match wgetCommand "^\s*kill[-_]\=longer" contained
87syn match wgetCommand "^\s*limit[-_]\=rate" contained
88syn match wgetCommand "^\s*load[-_]\=cookies" contained
89syn match wgetCommand "^\s*logfile" contained
90syn match wgetCommand "^\s*login" contained
91syn match wgetCommand "^\s*mirror" contained
92syn match wgetCommand "^\s*netrc" contained
93syn match wgetCommand "^\s*no[-_]\=clobber" contained
94syn match wgetCommand "^\s*no[-_]\=parent" contained
95syn match wgetCommand "^\s*no[-_]\=proxy" contained
96" Note: this option is deprecated, use 'tries' instead
97syn match wgetCommand "^\s*numtries" contained
98syn match wgetCommand "^\s*output[-_]\=document" contained
99syn match wgetCommand "^\s*page[-_]\=requisites" contained
100syn match wgetCommand "^\s*passive[-_]\=ftp" contained
101syn match wgetCommand "^\s*passwd" contained
102syn match wgetCommand "^\s*progress" contained
103syn match wgetCommand "^\s*proxy[-_]\=passwd" contained
104syn match wgetCommand "^\s*proxy[-_]\=user" contained
105syn match wgetCommand "^\s*quiet" contained
106syn match wgetCommand "^\s*quota" contained
107syn match wgetCommand "^\s*random[-_]\=wait" contained
108syn match wgetCommand "^\s*reclevel" contained
109syn match wgetCommand "^\s*recursive" contained
110syn match wgetCommand "^\s*referer" contained
111syn match wgetCommand "^\s*reject" contained
112syn match wgetCommand "^\s*relative[-_]\=only" contained
113syn match wgetCommand "^\s*remove[-_]\=listing" contained
114syn match wgetCommand "^\s*retr[-_]\=symlinks" contained
115syn match wgetCommand "^\s*robots" contained
116syn match wgetCommand "^\s*save[-_]\=cookies" contained
117syn match wgetCommand "^\s*save[-_]\=headers" contained
118syn match wgetCommand "^\s*server[-_]\=response" contained
119" Note: this option was removed in wget 1.8
120syn match wgetCommand "^\s*simple[-_]\=host[-_]\=check" contained
121syn match wgetCommand "^\s*span[-_]\=hosts" contained
122syn match wgetCommand "^\s*spider" contained
123syn match wgetCommand "^\s*sslcertfile" contained
124syn match wgetCommand "^\s*sslcertkey" contained
125syn match wgetCommand "^\s*timeout" contained
126syn match wgetCommand "^\s*time[-_]\=stamping" contained
127syn match wgetCommand "^\s*tries" contained
128syn match wgetCommand "^\s*use[-_]\=proxy" contained
129syn match wgetCommand "^\s*user[-_]\=agent" contained
130syn match wgetCommand "^\s*verbose" contained
131syn match wgetCommand "^\s*wait" contained
132syn match wgetCommand "^\s*wait[-_]\=retry" contained
133syn case match
134
135" Define the default highlighting.
136" For version 5.7 and earlier: only when not done already
137" For version 5.8 and later: only when an item doesn't have highlighting yet
138if version >= 508 || !exists("did_wget_syn_inits")
139 if version < 508
140 let did_wget_syn_inits = 1
141 command -nargs=+ HiLink hi link <args>
142 else
143 command -nargs=+ HiLink hi def link <args>
144 endif
145
146 HiLink wgetAssignmentOperator Special
147 HiLink wgetBoolean Boolean
148 HiLink wgetCommand Identifier
149 HiLink wgetComment Comment
150 HiLink wgetNumber Number
151 HiLink wgetQuota Number
152 HiLink wgetString String
153 HiLink wgetTodo Todo
154 HiLink wgetValue Constant
155
156 delcommand HiLink
157endif
158
159let b:current_syntax = "wget"