aboutsummaryrefslogtreecommitdiff
path: root/.vim/syntax/rnc.vim
diff options
context:
space:
mode:
authorRyan Kavanagh <ryanakca@kubuntu.org>2011-08-14 17:16:55 -0400
committerRyan Kavanagh <ryanakca@kubuntu.org>2011-08-25 07:42:57 -0400
commit1c019761dfaf6be82de9284fa5e2b9dbfbdec27d (patch)
tree7ed6bd2f437d3a334bd7a81f62e6dfa63689272b /.vim/syntax/rnc.vim
Initial import
Diffstat (limited to '.vim/syntax/rnc.vim')
-rw-r--r--.vim/syntax/rnc.vim59
1 files changed, 59 insertions, 0 deletions
diff --git a/.vim/syntax/rnc.vim b/.vim/syntax/rnc.vim
new file mode 100644
index 0000000..411046f
--- /dev/null
+++ b/.vim/syntax/rnc.vim
@@ -0,0 +1,59 @@
+" Vim syntax file
+" Language: RELAX NG Compact Syntax
+" Maintainer: Hans Fugal <hans@fugal.net>
+" Last Change: $Date: 2003/06/22 03:32:14 $
+" $Id: rnc.vim,v 1.7 2003/06/22 03:32:14 fugalh Exp $
+
+if version < 600
+ syntax clear
+elseif exists ("b:current_syntax")
+ finish
+endif
+
+" add the character '-' and '.' to iskeyword.
+set iskeyword+=45,46
+
+" Comments
+syn match Comment /^\s*#[^#].*$/
+syn match Documentation /^\s*##.*$/
+
+" Literals
+syn region literalSegment start=/"/ end=/"/
+
+syn match patternSpecial /[,&|?*+\\]/
+syn match Identifier /\k\+\s*\(&=\|=\||=\)\@=/ nextgroup=assignMethod
+syn match assignMethod /&=\|=\||=/
+syn match namespace /\k\+\(:\(\k\|\*\)\)\@=/
+syn region Annotation excludenl start=/\[/ end=/\]/ contains=ALLBUT,Identifier,patternName
+
+" named patterns (element and attribute)
+syn keyword patternKeyword element attribute nextgroup=patternName skipwhite skipempty
+syn match patternName /\k\+/ contained
+
+" Keywords
+syn keyword patternKeyword list mixed parent empty text notAllowed externalRef grammar
+syn keyword grammarContentKeyword div include
+syn keyword startKeyword start
+syn keyword datatypeNameKeyword string token
+syn keyword namespaceUriKeyword inherit
+syn keyword inheritKeyword inherit
+syn keyword declKeyword namespace default datatypes
+
+" Links
+hi link patternKeyword keyword
+hi link patternName Identifier
+hi link grammarContentKeyword keyword
+hi link startKeyword keyword
+hi link datatypeNameKeyword keyword
+hi link namespaceUriKeyword keyword
+hi link inheritKeyword keyword
+hi link declKeyword keyword
+
+hi link literalSegment String
+hi link Documentation Comment
+
+hi link patternSpecial Special
+hi link namespace Type
+
+let b:current_syntax = "rnc"
+" vim: ts=8 sw=4 smarttab