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