dsl.vim 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. " Vim syntax file
  2. " Language: DSSSL
  3. " Maintainer: Johannes Zellner <johannes@zellner.org>
  4. " Last Change: Tue, 27 Apr 2004 14:54:59 CEST
  5. " Filenames: *.dsl
  6. " $Id: dsl.vim,v 1.1 2004/06/13 19:13:31 vimboss Exp $
  7. if exists("b:current_syntax") | finish | endif
  8. runtime syntax/xml.vim
  9. syn cluster xmlRegionHook add=dslRegion,dslComment
  10. syn cluster xmlCommentHook add=dslCond
  11. " EXAMPLE:
  12. " <![ %output.html; [
  13. " <!-- some comment -->
  14. " (define html-manifest #f)
  15. " ]]>
  16. "
  17. " NOTE: 'contains' the same as xmlRegion, except xmlTag / xmlEndTag
  18. syn region dslCond matchgroup=dslCondDelim start="\[\_[^[]\+\[" end="]]" contains=xmlCdata,@xmlRegionCluster,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook
  19. " NOTE, that dslRegion and dslComment do both NOT have a 'contained'
  20. " argument, so this will also work in plain dsssl documents.
  21. syn region dslRegion matchgroup=Delimiter start=+(+ end=+)+ contains=dslRegion,dslString,dslComment
  22. syn match dslString +"\_[^"]*"+ contained
  23. syn match dslComment +;.*$+ contains=dslTodo
  24. syn keyword dslTodo contained TODO FIXME XXX display
  25. " The default highlighting.
  26. hi def link dslTodo Todo
  27. hi def link dslString String
  28. hi def link dslComment Comment
  29. " compare the following with xmlCdataStart / xmlCdataEnd
  30. hi def link dslCondDelim Type
  31. let b:current_syntax = "dsl"