summaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-08-13 14:58:53 +0200
committerBram Moolenaar <Bram@vim.org>2010-08-13 14:58:53 +0200
commit0fcd237614a157e724e388c781ea444b033f826f (patch)
treee7105d2ef870d1c7eabd1813fb5e3a198ab0556d /runtime/syntax
parent6b6eedfc1c827be45dbcf64346d28dd96d425c06 (diff)
downloadvim-0fcd237614a157e724e388c781ea444b033f826f.zip
Fix for Yaml syntax file. (Nikolai Weibull)
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/yaml.vim13
1 files changed, 8 insertions, 5 deletions
diff --git a/runtime/syntax/yaml.vim b/runtime/syntax/yaml.vim
index 4e93d67c7..1ff4fffc7 100644
--- a/runtime/syntax/yaml.vim
+++ b/runtime/syntax/yaml.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: YAML (YAML Ain't Markup Language)
" Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2010-05-30
+" Latest Revision: 2010-08-12
if exists("b:current_syntax")
finish
@@ -17,7 +17,7 @@ syn region yamlComment display oneline start='\%(^\|\s\)#' end='$'
syn match yamlNodeProperty '!\%(![^\\^% ]\+\|[^!][^:/ ]*\)'
-syn match yamlAnchor '&[^ \t]\+'
+syn match yamlAnchor '&.\+'
syn match yamlAlias '\*.\+'
@@ -26,9 +26,11 @@ syn match yamlBlock '[\[\]{}>|]'
syn match yamlOperator '[?+-]'
syn match yamlKey '\w\+\(\s\+\w\+\)*\ze\s*:'
-syn region yamlString start=+"+ skip=+\\"+ end=+"+
+syn region yamlString matchgroup=yamlStringDelimiter
+ \ start=+"+ skip=+\\"+ end=+"+
\ contains=yamlEscape
-syn region yamlString start=+'+ skip=+''+ end=+'+
+syn region yamlString matchgroup=yamlStringDelimiter
+ \ start=+'+ skip=+''+ end=+'+
\ contains=yamlSingleEscape
syn match yamlEscape contained display +\\[\\"abefnrtv^0_ NLP]+
syn match yamlEscape contained display '\\x\x\{2}'
@@ -36,7 +38,7 @@ syn match yamlEscape contained display '\\u\x\{4}'
syn match yamlEscape contained display '\\U\x\{8}'
" TODO: how do we get 0x85, 0x2028, and 0x2029 into this?
syn match yamlEscape display '\\\%(\r\n\|[\r\n]\)'
-syn match yamlSingleEscape contained display +''+
+syn match yamlSingleEscape contained +''+
" TODO: sexagecimal and fixed (20:30.15 and 1,230.15)
syn match yamlNumber display
@@ -71,6 +73,7 @@ hi def link yamlBlock Operator
hi def link yamlOperator Operator
hi def link yamlKey Identifier
hi def link yamlString String
+hi def link yamlStringDelimiter yamlString
hi def link yamlEscape SpecialChar
hi def link yamlSingleEscape SpecialChar
hi def link yamlNumber Number