cheetah.vim 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. " Vim syntax file
  2. " Language: Cheetah template engine
  3. " Maintainer: Max Ischenko <mfi@ukr.net>
  4. " Last Change: 2003-05-11
  5. "
  6. " Missing features:
  7. " match invalid syntax, like bad variable ref. or unmatched closing tag
  8. " PSP-style tags: <% .. %> (obsoleted feature)
  9. " doc-strings and header comments (rarely used feature)
  10. " quit when a syntax file was already loaded
  11. if exists("b:current_syntax")
  12. finish
  13. endif
  14. syntax case match
  15. syn keyword cheetahKeyword contained if else unless elif for in not
  16. syn keyword cheetahKeyword contained while repeat break continue pass end
  17. syn keyword cheetahKeyword contained set del attr def global include raw echo
  18. syn keyword cheetahKeyword contained import from extends implements
  19. syn keyword cheetahKeyword contained assert raise try catch finally
  20. syn keyword cheetahKeyword contained errorCatcher breakpoint silent cache filter
  21. syn match cheetahKeyword contained "\<compiler-settings\>"
  22. " Matches cached placeholders
  23. syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?\h\w*\(\.\h\w*\)*" display
  24. syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?{\h\w*\(\.\h\w*\)*}" display
  25. syn match cheetahDirective "^\s*#[^#].*$" contains=cheetahPlaceHolder,cheetahKeyword,cheetahComment display
  26. syn match cheetahContinuation "\\$"
  27. syn match cheetahComment "##.*$" display
  28. syn region cheetahMultiLineComment start="#\*" end="\*#"
  29. " Define the default highlighting.
  30. " Only when an item doesn't have highlighting yet
  31. hi def link cheetahPlaceHolder Identifier
  32. hi def link cheetahDirective PreCondit
  33. hi def link cheetahKeyword Define
  34. hi def link cheetahContinuation Special
  35. hi def link cheetahComment Comment
  36. hi def link cheetahMultiLineComment Comment
  37. let b:current_syntax = "cheetah"