home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / syntax / cheetah.vim < prev    next >
Encoding:
Text File  |  2003-05-13  |  2.1 KB  |  61 lines

  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.  
  11. " For version 5.x: Clear all syntax items
  12. " For version 6.x: Quit when a syntax file was already loaded
  13. if version < 600
  14.     syntax clear
  15. elseif exists("b:current_syntax")
  16.     finish
  17. endif
  18.  
  19. syntax case match
  20.  
  21. syn keyword cheetahKeyword contained if else unless elif for in not
  22. syn keyword cheetahKeyword contained while repeat break continue pass end
  23. syn keyword cheetahKeyword contained set del attr def global include raw echo
  24. syn keyword cheetahKeyword contained import from extends implements
  25. syn keyword cheetahKeyword contained assert raise try catch finally
  26. syn keyword cheetahKeyword contained errorCatcher breakpoint silent cache filter
  27. syn match   cheetahKeyword contained "\<compiler-settings\>"
  28.  
  29. " Matches cached placeholders
  30. syn match   cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?\h\w*\(\.\h\w*\)*" display
  31. syn match   cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?{\h\w*\(\.\h\w*\)*}" display
  32. syn match   cheetahDirective "^\s*#[^#].*$"  contains=cheetahPlaceHolder,cheetahKeyword,cheetahComment display
  33.  
  34. syn match   cheetahContinuation "\\$"
  35. syn match   cheetahComment "##.*$" display
  36. syn region  cheetahMultiLineComment start="#\*" end="\*#"
  37.  
  38. " Define the default highlighting.
  39. " For version 5.7 and earlier: only when not done already
  40. " For version 5.8 and later: only when an item doesn't have highlighting yet
  41. if version >= 508 || !exists("did_cheetah_syn_inits")
  42.     if version < 508
  43.         let did_cheetah_syn_inits = 1
  44.         command -nargs=+ HiLink hi link <args>
  45.     else
  46.         command -nargs=+ HiLink hi def link <args>
  47.     endif
  48.  
  49.     HiLink cheetahPlaceHolder Identifier
  50.     HiLink cheetahDirective PreCondit
  51.     HiLink cheetahKeyword Define
  52.     HiLink cheetahContinuation Special
  53.     HiLink cheetahComment Comment
  54.     HiLink cheetahMultiLineComment Comment
  55.  
  56.     delcommand HiLink
  57. endif
  58.  
  59. let b:current_syntax = "cheetah"
  60.  
  61.