dictconf.vim 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. " Vim syntax file
  2. " Language: dict(1) configuration file
  3. " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
  4. " Latest Revision: 2006-04-19
  5. if exists("b:current_syntax")
  6. finish
  7. endif
  8. let s:cpo_save = &cpo
  9. set cpo&vim
  10. syn keyword dictconfTodo contained TODO FIXME XXX NOTE
  11. syn region dictconfComment display oneline start='#' end='$'
  12. \ contains=dictconfTodo,@Spell
  13. syn match dictconfBegin display '^'
  14. \ nextgroup=dictconfKeyword,dictconfComment
  15. \ skipwhite
  16. syn keyword dictconfKeyword contained server
  17. \ nextgroup=dictconfServer skipwhite
  18. syn keyword dictconfKeyword contained pager
  19. \ nextgroup=dictconfPager
  20. syn match dictconfServer contained display
  21. \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
  22. \ nextgroup=dictconfServerOptG skipwhite
  23. syn region dictconfServer contained display oneline
  24. \ start=+"+ skip=+""+ end=+"+
  25. \ nextgroup=dictconfServerOptG skipwhite
  26. syn region dictconfServerOptG contained transparent
  27. \ matchgroup=dictconfServerOptsD start='{'
  28. \ matchgroup=dictconfServerOptsD end='}'
  29. \ contains=dictconfServerOpts,dictconfComment
  30. syn keyword dictconfServerOpts contained port
  31. \ nextgroup=dictconfNumber skipwhite
  32. syn keyword dictconfServerOpts contained user
  33. \ nextgroup=dictconfUsername skipwhite
  34. syn match dictconfUsername contained display
  35. \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
  36. \ nextgroup=dictconfSecret skipwhite
  37. syn region dictconfUsername contained display oneline
  38. \ start=+"+ skip=+""+ end=+"+
  39. \ nextgroup=dictconfSecret skipwhite
  40. syn match dictconfSecret contained display
  41. \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
  42. syn region dictconfSecret contained display oneline
  43. \ start=+"+ skip=+""+ end=+"+
  44. syn match dictconfNumber contained '\<\d\+\>'
  45. syn match dictconfPager contained display
  46. \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
  47. syn region dictconfPager contained display oneline
  48. \ start=+"+ skip=+""+ end=+"+
  49. hi def link dictconfTodo Todo
  50. hi def link dictconfComment Comment
  51. hi def link dictconfKeyword Keyword
  52. hi def link dictconfServer String
  53. hi def link dictconfServerOptsD Delimiter
  54. hi def link dictconfServerOpts Identifier
  55. hi def link dictconfUsername String
  56. hi def link dictconfSecret Special
  57. hi def link dictconfNumber Number
  58. hi def link dictconfPager String
  59. let b:current_syntax = "dictconf"
  60. let &cpo = s:cpo_save
  61. unlet s:cpo_save