texmf.vim 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. " Vim syntax file
  2. " This is a GENERATED FILE. Please always refer to source file at the URI below.
  3. " Language: Web2C TeX texmf.cnf configuration file
  4. " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
  5. " Last Change: 2001-05-13
  6. " URL: http://physics.muni.cz/~yeti/download/syntax/texmf.vim
  7. " Setup
  8. " quit when a syntax file was already loaded
  9. if exists("b:current_syntax")
  10. finish
  11. endif
  12. syn case match
  13. " Comments
  14. syn match texmfComment "%..\+$" contains=texmfTodo
  15. syn match texmfComment "%\s*$" contains=texmfTodo
  16. syn keyword texmfTodo TODO FIXME XXX NOT contained
  17. " Constants and parameters
  18. syn match texmfPassedParameter "[-+]\=%\w\W"
  19. syn match texmfPassedParameter "[-+]\=%\w$"
  20. syn match texmfNumber "\<\d\+\>"
  21. syn match texmfVariable "\$\(\w\k*\|{\w\k*}\)"
  22. syn match texmfSpecial +\\"\|\\$+
  23. syn region texmfString start=+"+ end=+"+ skip=+\\"\\\\+ contains=texmfVariable,texmfSpecial,texmfPassedParameter
  24. " Assignments
  25. syn match texmfLHSStart "^\s*\w\k*" nextgroup=texmfLHSDot,texmfEquals
  26. syn match texmfLHSVariable "\w\k*" contained nextgroup=texmfLHSDot,texmfEquals
  27. syn match texmfLHSDot "\." contained nextgroup=texmfLHSVariable
  28. syn match texmfEquals "\s*=" contained
  29. " Specialities
  30. syn match texmfComma "," contained
  31. syn match texmfColons ":\|;"
  32. syn match texmfDoubleExclam "!!" contained
  33. " Catch errors caused by wrong parenthesization
  34. syn region texmfBrace matchgroup=texmfBraceBrace start="{" end="}" contains=ALLBUT,texmfTodo,texmfBraceError,texmfLHSVariable,texmfLHSDot transparent
  35. syn match texmfBraceError "}"
  36. " Define the default highlighting
  37. hi def link texmfComment Comment
  38. hi def link texmfTodo Todo
  39. hi def link texmfPassedParameter texmfVariable
  40. hi def link texmfVariable Identifier
  41. hi def link texmfNumber Number
  42. hi def link texmfString String
  43. hi def link texmfLHSStart texmfLHS
  44. hi def link texmfLHSVariable texmfLHS
  45. hi def link texmfLHSDot texmfLHS
  46. hi def link texmfLHS Type
  47. hi def link texmfEquals Normal
  48. hi def link texmfBraceBrace texmfDelimiter
  49. hi def link texmfComma texmfDelimiter
  50. hi def link texmfColons texmfDelimiter
  51. hi def link texmfDelimiter Preproc
  52. hi def link texmfDoubleExclam Statement
  53. hi def link texmfSpecial Special
  54. hi def link texmfBraceError texmfError
  55. hi def link texmfError Error
  56. let b:current_syntax = "texmf"