annotate runtime/syntax/dsl.vim @ 27:a01d8d9b2a58 first-working-version

first working version.
author kono
date Mon, 27 Oct 2008 18:28:11 +0900
parents 76efa0be13f1
children e170173ecb68
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
1 " Vim syntax file
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
2 " Language: DSSSL
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
3 " Maintainer: Johannes Zellner <johannes@zellner.org>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
4 " Last Change: Tue, 27 Apr 2004 14:54:59 CEST
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
5 " Filenames: *.dsl
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
6 " $Id$
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
7
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
8 if exists("b:current_syntax") | finish | endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
9
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
10 runtime syntax/xml.vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
11 syn cluster xmlRegionHook add=dslRegion,dslComment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
12 syn cluster xmlCommentHook add=dslCond
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
13
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
14 " EXAMPLE:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
15 " <![ %output.html; [
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
16 " <!-- some comment -->
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
17 " (define html-manifest #f)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
18 " ]]>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
19 "
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
20 " NOTE: 'contains' the same as xmlRegion, except xmlTag / xmlEndTag
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
21 syn region dslCond matchgroup=dslCondDelim start="\[\_[^[]\+\[" end="]]" contains=xmlCdata,@xmlRegionCluster,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
22
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
23 " NOTE, that dslRegion and dslComment do both NOT have a 'contained'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
24 " argument, so this will also work in plain dsssl documents.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
25
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
26 syn region dslRegion matchgroup=Delimiter start=+(+ end=+)+ contains=dslRegion,dslString,dslComment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
27 syn match dslString +"\_[^"]*"+ contained
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
28 syn match dslComment +;.*$+ contains=dslTodo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
29 syn keyword dslTodo contained TODO FIXME XXX display
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
30
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
31 " The default highlighting.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
32 hi def link dslTodo Todo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
33 hi def link dslString String
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
34 hi def link dslComment Comment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
35 " compare the following with xmlCdataStart / xmlCdataEnd
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
36 hi def link dslCondDelim Type
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
37
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
38 let b:current_syntax = "dsl"