lftp.vim 7.3 KB

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