7
|
1 " Vim syntax file
|
11062
|
2 " Language: Relax NG compact syntax
|
|
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2007-06-17
|
7
|
5
|
375
|
6 if exists("b:current_syntax")
|
7
|
7 finish
|
|
8 endif
|
|
9
|
375
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
1620
|
13 setlocal iskeyword+=-,.
|
7
|
14
|
375
|
15 syn keyword rncTodo contained TODO FIXME XXX NOTE
|
7
|
16
|
389
|
17 syn region rncComment display oneline start='^\s*#' end='$'
|
375
|
18 \ contains=rncTodo,@Spell
|
7
|
19
|
375
|
20 syn match rncOperator display '[-|,&+?*~]'
|
|
21 syn match rncOperator display '\%(|&\)\=='
|
|
22 syn match rncOperator display '>>'
|
7
|
23
|
375
|
24 syn match rncNamespace display '\<\k\+:'
|
7
|
25
|
375
|
26 syn match rncQuoted display '\\\k\+\>'
|
7
|
27
|
375
|
28 syn match rncSpecial display '\\x{\x\+}'
|
7
|
29
|
375
|
30 syn region rncAnnotation transparent start='\[' end='\]'
|
|
31 \ contains=ALLBUT,rncComment,rncTodo
|
7
|
32
|
389
|
33 syn region rncLiteral display oneline start=+"+ end=+"+
|
375
|
34 \ contains=rncSpecial
|
389
|
35 syn region rncLiteral display oneline start=+'+ end=+'+
|
|
36 syn region rncLiteral display oneline start=+"""+ end=+"""+
|
375
|
37 \ contains=rncSpecial
|
389
|
38 syn region rncLiteral display oneline start=+'''+ end=+'''+
|
7
|
39
|
375
|
40 syn match rncDelimiter display '[{},()]'
|
7
|
41
|
375
|
42 syn keyword rncKeyword datatypes default div empty external grammar
|
|
43 syn keyword rncKeyword include inherit list mixed name namespace
|
|
44 syn keyword rncKeyword notAllowed parent start string text token
|
7
|
45
|
375
|
46 syn match rncIdentifier display '\k\+\_s*\%(=\|&=\||=\)\@='
|
|
47 \ nextgroup=rncOperator
|
|
48 syn keyword rncKeyword element attribute
|
|
49 \ nextgroup=rncIdName skipwhite skipempty
|
|
50 syn match rncIdName contained '\k\+'
|
7
|
51
|
375
|
52 hi def link rncTodo Todo
|
|
53 hi def link rncComment Comment
|
|
54 hi def link rncOperator Operator
|
|
55 hi def link rncNamespace Identifier
|
|
56 hi def link rncQuoted Special
|
|
57 hi def link rncSpecial SpecialChar
|
|
58 hi def link rncAnnotation Special
|
|
59 hi def link rncLiteral String
|
|
60 hi def link rncDelimiter Delimiter
|
|
61 hi def link rncKeyword Keyword
|
|
62 hi def link rncIdentifier Identifier
|
|
63 hi def link rncIdName Identifier
|
7
|
64
|
|
65 let b:current_syntax = "rnc"
|
|
66
|
375
|
67 let &cpo = s:cpo_save
|
|
68 unlet s:cpo_save
|