vim/syntax/yml2.vim
changeset 2 4b65c6f36f21
parent 1 23daf9d318ac
equal deleted inserted replaced
1:23daf9d318ac 2:4b65c6f36f21
    20 " for line continuation.  Some compilers allow it, which makes it
    20 " for line continuation.  Some compilers allow it, which makes it
    21 " unpredicatable and should be avoided.
    21 " unpredicatable and should be avoided.
    22 syn match	cBadContinuation contained "\\\s\+$"
    22 syn match	cBadContinuation contained "\\\s\+$"
    23 
    23 
    24 " cCommentGroup allows adding matches for special things in comments
    24 " cCommentGroup allows adding matches for special things in comments
    25 syn cluster	cCommentGroup	contains=cTodo,cBadContinuation,ymlString
    25 syn cluster	cCommentGroup	contains=cTodo,cBadContinuation,ymlStringComment
    26 
    26 
    27 " String and Character constants
    27 " String and Character constants
    28 " Highlight special characters (those which have a backslash) differently
    28 " Highlight special characters (those which have a backslash) differently
    29 syn match	cSpecial	display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
    29 syn match	cSpecial	display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
    30 if !exists("c_no_utf")
    30 if !exists("c_no_utf")
    31   syn match	cSpecial	display contained "\\\(u\x\{4}\|U\x\{8}\)"
    31   syn match	cSpecial	display contained "\\\(u\x\{4}\|U\x\{8}\)"
    32 endif
    32 endif
    33 syn region	ymlString		start=+L\=«+ skip=+\\\\\|\\"+ end=+»+ contains=cSpecial,@Spell
    33 syn region	ymlString		start=+L\=«+ end=+»+ contains=cSpecial,@Spell
       
    34 syn region	ymlStringComment		start=+L\=«+ end=+»+ contains=cSpecial,@Spell
    34 if exists("c_no_cformat")
    35 if exists("c_no_cformat")
    35   syn region	cString		start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell,ymlString
    36   syn region	cString		start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell,ymlString
    36   " cCppString: same as cString, but ends at end of line
    37   " cCppString: same as cString, but ends at end of line
    37   syn region	cCppString	start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,@Spell,ymlString
    38   syn region	cCppString	start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,@Spell,ymlString
    38 else
    39 else
   368 hi def link cBadContinuation	Error
   369 hi def link cBadContinuation	Error
   369 hi def link cCppSkip		cCppOut
   370 hi def link cCppSkip		cCppOut
   370 hi def link cCppOut2		cCppOut
   371 hi def link cCppOut2		cCppOut
   371 hi def link cCppOut		Comment
   372 hi def link cCppOut		Comment
   372 hi def link ymlString   Operator
   373 hi def link ymlString   Operator
       
   374 hi def link ymlStringComment   Operator
   373 let b:current_syntax = "yml2"
   375 let b:current_syntax = "yml2"
   374 
   376 
   375 " vim: ts=8
   377 " vim: ts=8