blob: fc1958ed3196cf4675b78415969e87e34bd3508c [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: lftp(1) configuration file
3" Maintainer: Nikolai Weibull <source@pcppopper.org>
4" URL: http://www.pcppopper.org/vim/syntax/pcp/lftp/
5" Latest Revision: 2004-05-22
6" arch-tag: f2537c49-5d64-42b8-beb4-13a09dd723d2
7
8if version < 600
9 syntax clear
10elseif exists("b:current_syntax")
11 finish
12endif
13
14" Set iskeyword since we need `-' (and potentially others) in keywords.
15" For version 5.x: Set it globally
16" For version 6.x: Set it locally
17if version >= 600
18 command -nargs=1 SetIsk setlocal iskeyword=<args>
19else
20 command -nargs=1 SetIsk set iskeyword=<args>
21endif
22SetIsk 48-57,97-122,-
23delcommand SetIsk
24
25" comments
26syn region lftpComment display oneline matchgroup=lftpComment start="#" end="$" contains=lftpTodo
27
28" todo
29syn keyword lftpTodo contained TODO FIXME XXX NOTE
30
31" strings
32syn region lftpString contained display start=+"+ skip=+\\$\|\\"+ end=+"+ end=+$+
33
34" numbers
35syn match lftpNumber contained display "\<\d\+\(\.\d\+\)\=\>"
36
37" booleans and other things
38syn keyword lftpBoolean contained yes no on off true false
39
40" intervals
41syn keyword lftpInterval contained infinity inf never forever
42syn match lftpInterval contained "\<\(\d\+\(\.\d\+\)\=[dhms]\)\+\>"
43
44" commands
45syn keyword lftpKeywords alias anon at bookmark cache cat cd chmod close
46syn keyword lftpKeywords cls command debug du echo exit fg find get get1
47syn keyword lftpKeywords glob help history jobs kill lcd lftp lpwd ls
48syn keyword lftpKeywords mget mirror mkdir module
49syn keyword lftpKeywords more mput mrm mv nlist open pget put pwd queue
50syn keyword lftpKeywords quote reget recls rels renlist repeat
51syn keyword lftpKeywords reput rm rmdir scache site source suspend user
52syn keyword lftpKeywords version wait zcat zmore
53
54" settings
55syn region lftpSet matchgroup=lftpKeywords start="set" end=";" end="$" contains=lftpString,lftpNumber,lftpBoolean,lftpInterval,lftpSettingsPrefix,lftpSettings
56syn match lftpSettingsPrefix contained '\<\%(bmk\|cache\|cmd\|color\|dns\):'
57syn match lftpSettingsPrefix contained '\<\%(file\|fish\|ftp\|hftp\):'
58syn match lftpSettingsPrefix contained '\<\%(http\|https\|mirror\|module\):'
59syn match lftpSettingsPrefix contained '\<\%(net\|sftp\|ssl\|xfer\):'
60" bmk:
61syn keyword lftpSettings contained save-p[asswords]
62" cache:
63syn keyword lftpSettings contained cache-em[pty-listings] en[able]
64syn keyword lftpSettings contained exp[ire] siz[e]
65" cmd:
66syn keyword lftpSettings contained at[-exit] cls-c[ompletion-default]
67syn keyword lftpSettings contained cls-d[efault] cs[h-history]
68syn keyword lftpSettings contained default-p[rotocol] default-t[itle]
69syn keyword lftpSettings contained fai[l-exit] in[teractive]
70syn keyword lftpSettings contained lo[ng-running] ls[-default]
71syn keyword lftpSettings contained mo[ve-background] prom[pt]
72syn keyword lftpSettings contained rem[ote-completion]
73syn keyword lftpSettings contained save-c[wd-history] save-r[l-history]
74syn keyword lftpSettings contained set-t[erm-status] statu[s-interval]
75syn keyword lftpSettings contained te[rm-status] verb[ose] verify-h[ost]
76syn keyword lftpSettings contained verify-path verify-path[-cached]
77" color:
78syn keyword lftpSettings contained dir[-colors] use-c[olor]
79" dns:
80syn keyword lftpSettings contained S[RV-query] cache-en[able]
81syn keyword lftpSettings contained cache-ex[pire] cache-s[ize]
82syn keyword lftpSettings contained fat[al-timeout] o[rder] use-fo[rk]
83" file:
84syn keyword lftpSettings contained ch[arset]
85" fish:
86syn keyword lftpSettings contained connect[-program] sh[ell]
87" ftp:
88syn keyword lftpSettings contained acct anon-p[ass] anon-u[ser]
89syn keyword lftpSettings contained au[to-sync-mode] b[ind-data-socket]
90syn keyword lftpSettings contained ch[arset] cli[ent] dev[ice-prefix]
91syn keyword lftpSettings contained fi[x-pasv-address] fxp-f[orce]
92syn keyword lftpSettings contained fxp-p[assive-source] h[ome] la[ng]
93syn keyword lftpSettings contained list-e[mpty-ok] list-o[ptions]
94syn keyword lftpSettings contained nop[-interval] pas[sive-mode]
95syn keyword lftpSettings contained port-i[pv4] port-r[ange] prox[y]
96syn keyword lftpSettings contained rest-l[ist] rest-s[tor]
97syn keyword lftpSettings contained retry-530 retry-530[-anonymous]
98syn keyword lftpSettings contained sit[e-group] skey-a[llow]
99syn keyword lftpSettings contained skey-f[orce] ssl-allow
100syn keyword lftpSettings contained ssl-allow[-anonymous] ssl-au[th]
101syn keyword lftpSettings contained ssl-f[orce] ssl-protect-d[ata]
102syn keyword lftpSettings contained ssl-protect-l[ist] stat-[interval]
103syn keyword lftpSettings contained sy[nc-mode] timez[one] use-a[bor]
104syn keyword lftpSettings contained use-fe[at] use-fx[p] use-hf[tp]
105syn keyword lftpSettings contained use-mdtm use-mdtm[-overloaded]
106syn keyword lftpSettings contained use-ml[sd] use-p[ret] use-q[uit]
107syn keyword lftpSettings contained use-site-c[hmod] use-site-i[dle]
108syn keyword lftpSettings contained use-site-u[time] use-siz[e]
109syn keyword lftpSettings contained use-st[at] use-te[lnet-iac]
110syn keyword lftpSettings contained verify-a[ddress] verify-p[ort]
111syn keyword lftpSettings contained w[eb-mode]
112" hftp:
113syn keyword lftpSettings contained w[eb-mode] cache prox[y]
114syn keyword lftpSettings contained use-au[thorization] use-he[ad]
115syn keyword lftpSettings contained use-ty[pe]
116" http:
117syn keyword lftpSettings contained accept accept-c[harset]
118syn keyword lftpSettings contained accept-l[anguage] cache coo[kie]
119syn keyword lftpSettings contained pos[t-content-type] prox[y]
120syn keyword lftpSettings contained put-c[ontent-type] put-m[ethod]
121syn keyword lftpSettings contained ref[erer] set-c[ookies] user[-agent]
122" https:
123syn keyword lftpSettings contained prox[y]
124" mirror:
125syn keyword lftpSettings contained exc[lude-regex] o[rder]
126syn keyword lftpSettings contained parallel-d[irectories]
127syn keyword lftpSettings contained parallel-t[ransfer-count]
128syn keyword lftpSettings contained use-p[get-n]
129" module:
130syn keyword lftpSettings contained pat[h]
131" net:
132syn keyword lftpSettings contained connection-l[imit]
133syn keyword lftpSettings contained connection-t[akeover]
134syn keyword lftpSettings contained id[le] limit-m[ax] limit-r[ate]
135syn keyword lftpSettings contained limit-total-m[ax] limit-total-r[ate]
136syn keyword lftpSettings contained max-ret[ries] no-[proxy]
137syn keyword lftpSettings contained pe[rsist-retries]
138syn keyword lftpSettings contained reconnect-interval-b[ase]
139syn keyword lftpSettings contained reconnect-interval-ma[x]
140syn keyword lftpSettings contained reconnect-interval-mu[ltiplier]
141syn keyword lftpSettings contained socket-bind-ipv4 socket-bind-ipv6
142syn keyword lftpSettings contained socket-bu[ffer] socket-m[axseg]
143syn keyword lftpSettings contained timeo[ut]
144" sftp:
145syn keyword lftpSettings contained connect[-program]
146syn keyword lftpSettings contained max-p[ackets-in-flight]
147syn keyword lftpSettings contained prot[ocol-version] ser[ver-program]
148syn keyword lftpSettings contained size-r[ead] size-w[rite]
149" ssl:
150syn keyword lftpSettings contained ca-f[ile] ca-p[ath] ce[rt-file]
151syn keyword lftpSettings contained crl-f[ile] crl-p[ath] k[ey-file]
152syn keyword lftpSettings contained verify-c[ertificate]
153" xfer:
154syn keyword lftpSettings contained clo[bber] dis[k-full-fatal]
155syn keyword lftpSettings contained eta-p[eriod] eta-t[erse]
156syn keyword lftpSettings contained mak[e-backup] max-red[irections]
157syn keyword lftpSettings contained ra[te-period]
158
159" Define the default highlighting.
160" For version 5.7 and earlier: only when not done already
161" For version 5.8 and later: only when an item doesn't have highlighting yet
162if version >= 508 || !exists("did_lftp_syn_inits")
163 if version < 508
164 let did_lftp_syn_inits = 1
165 command -nargs=+ HiLink hi link <args>
166 else
167 command -nargs=+ HiLink hi def link <args>
168 endif
169
170 HiLink lftpComment Comment
171 HiLink lftpTodo Todo
172 HiLink lftpString String
173 HiLink lftpNumber Number
174 HiLink lftpBoolean Boolean
175 HiLink lftpInterval Number
176 HiLink lftpKeywords Keyword
177 HiLink lftpSettingsPrefix PreProc
178 HiLink lftpSettings Type
179 delcommand HiLink
180endif
181
182let b:current_syntax = "lftp"
183
184" vim: set sts=2 sw=2: