a2ps.vim 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. " Vim syntax file
  2. " Language: a2ps(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 a2psPreProc Include
  11. \ nextgroup=a2psKeywordColon
  12. syn keyword a2psMacro UserOption
  13. \ nextgroup=a2psKeywordColon
  14. syn keyword a2psKeyword LibraryPath AppendLibraryPath PrependLibraryPath
  15. \ Options Medium Printer UnknownPrinter
  16. \ DefaultPrinter OutputFirstLine
  17. \ PageLabelFormat Delegation FileCommand
  18. \ nextgroup=a2psKeywordColon
  19. syn match a2psKeywordColon contained display ':'
  20. syn keyword a2psKeyword Variable nextgroup=a2psVariableColon
  21. syn match a2psVariableColon contained display ':'
  22. \ nextgroup=a2psVariable skipwhite
  23. syn match a2psVariable contained display '[^ \t:(){}]\+'
  24. \ contains=a2psVarPrefix
  25. syn match a2psVarPrefix contained display
  26. \ '\<\%(del\|pro\|ps\|pl\|toc\|user\|\)\ze\.'
  27. syn match a2psLineCont display '\\$'
  28. syn match a2psSubst display '$\%(-\=.\=\d\+\)\=\h\d\='
  29. syn match a2psSubst display '#[?!]\=\w\d\='
  30. syn match a2psSubst display '#{[^}]\+}'
  31. syn region a2psString display oneline start=+'+ end=+'+
  32. \ contains=a2psSubst
  33. syn region a2psString display oneline start=+"+ end=+"+
  34. \ contains=a2psSubst
  35. syn keyword a2psTodo contained TODO FIXME XXX NOTE
  36. syn region a2psComment display oneline start='^\s*#' end='$'
  37. \ contains=a2psTodo,@Spell
  38. hi def link a2psTodo Todo
  39. hi def link a2psComment Comment
  40. hi def link a2psPreProc PreProc
  41. hi def link a2psMacro Macro
  42. hi def link a2psKeyword Keyword
  43. hi def link a2psKeywordColon Delimiter
  44. hi def link a2psVariableColon Delimiter
  45. hi def link a2psVariable Identifier
  46. hi def link a2psVarPrefix Type
  47. hi def link a2psLineCont Special
  48. hi def link a2psSubst PreProc
  49. hi def link a2psString String
  50. let b:current_syntax = "a2ps"
  51. let &cpo = s:cpo_save
  52. unlet s:cpo_save