annotate runtime/syntax/yaml.vim @ 4831:b8eabb6a9687 v7.3.1162

updated for version 7.3.1162 Problem: Python: Memory leaks Solution: Add more Py_DECREF(). (ZyX)
author Bram Moolenaar <bram@vim.org>
date Mon, 10 Jun 2013 20:47:36 +0200
parents 7d8af31066c8
children 22da5ab9aaa1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
2 " Language: YAML (YAML Ain't Markup Language) 1.2
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
3 " Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
4 " First author: Nikolai Weibull <now@bitwi.se>
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2581
diff changeset
5 " Latest Revision: 2010-10-08
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
7 if exists('b:current_syntax')
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
8 finish
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
11 let s:cpo_save = &cpo
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
12 set cpo&vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
14 let s:ns_char = '\%(\%([\n\r\uFEFF \t]\)\@!\p\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
15 let s:ns_word_char = '\%(\w\|-\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
16 let s:ns_uri_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$,.!~*''()\[\]]\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
17 let s:ns_tag_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$.~*''()]\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
18 let s:c_ns_anchor_char = '\%(\%([\n\r\uFEFF \t,\[\]{}]\)\@!\p\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
19 let s:c_indicator = '[\-?:,\[\]{}#&*!|>''"%@`]'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
20 let s:c_flow_indicator = '[,\[\]{}]'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
21
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
22 let s:c_verbatim_tag = '!<'.s:ns_uri_char.'\+>'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
23 let s:c_named_tag_handle = '!'.s:ns_word_char.'\+!'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
24 let s:c_secondary_tag_handle = '!!'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
25 let s:c_primary_tag_handle = '!'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
26 let s:c_tag_handle = '\%('.s:c_named_tag_handle.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
27 \ '\|'.s:c_secondary_tag_handle.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
28 \ '\|'.s:c_primary_tag_handle.'\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
29 let s:c_ns_shorthand_tag = s:c_tag_handle . s:ns_tag_char.'\+'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
30 let s:c_non_specific_tag = '!'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
31 let s:c_ns_tag_property = s:c_verbatim_tag.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
32 \ '\|'.s:c_ns_shorthand_tag.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
33 \ '\|'.s:c_non_specific_tag
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
34
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
35 let s:c_ns_anchor_name = s:c_ns_anchor_char.'\+'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
36 let s:c_ns_anchor_property = '&'.s:c_ns_anchor_name
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
37 let s:c_ns_alias_node = '\*'.s:c_ns_anchor_name
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
38
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
39 let s:ns_directive_name = s:ns_char.'\+'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
40
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
41 let s:ns_local_tag_prefix = '!'.s:ns_uri_char.'*'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
42 let s:ns_global_tag_prefix = s:ns_tag_char.s:ns_uri_char.'*'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
43 let s:ns_tag_prefix = s:ns_local_tag_prefix.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
44 \ '\|'.s:ns_global_tag_prefix
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
45
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
46 let s:ns_plain_safe_out = s:ns_char
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
47 let s:ns_plain_safe_in = '\%('.s:c_flow_indicator.'\@!'.s:ns_char.'\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
48
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
49 let s:ns_plain_first_in = '\%('.s:c_indicator.'\@!'.s:ns_char.'\|[?:\-]\%('.s:ns_plain_safe_in.'\)\@=\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
50 let s:ns_plain_first_out = '\%('.s:c_indicator.'\@!'.s:ns_char.'\|[?:\-]\%('.s:ns_plain_safe_out.'\)\@=\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
51
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
52 let s:ns_plain_char_in = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_in.'\|[:#]\@!'.s:ns_plain_safe_in.'\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
53 let s:ns_plain_char_out = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_out.'\|[:#]\@!'.s:ns_plain_safe_out.'\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
54
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
55 let s:ns_plain_out = s:ns_plain_first_out . s:ns_plain_char_out.'*'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
56 let s:ns_plain_in = s:ns_plain_first_in . s:ns_plain_char_in.'*'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
57
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
58
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
59 syn keyword yamlTodo contained TODO FIXME XXX NOTE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
61 syn region yamlComment display oneline start='\%\(^\|\s\)#' end='$'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
62 \ contains=yamlTodo
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
64 execute 'syn region yamlDirective oneline start='.string('^\ze%'.s:ns_directive_name.'\s\+').' '.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
65 \ 'end="$" '.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
66 \ 'contains=yamlTAGDirective,'.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
67 \ 'yamlYAMLDirective,'.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
68 \ 'yamlReservedDirective '.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
69 \ 'keepend'
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1618
diff changeset
70
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
71 syn match yamlTAGDirective '%TAG\s\+' contained nextgroup=yamlTagHandle
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
72 execute 'syn match yamlTagHandle contained nextgroup=yamlTagPrefix '.string(s:c_tag_handle.'\s\+')
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
73 execute 'syn match yamlTagPrefix contained nextgroup=yamlComment ' . string(s:ns_tag_prefix)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
75 syn match yamlYAMLDirective '%YAML\s\+' contained nextgroup=yamlYAMLVersion
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
76 syn match yamlYAMLVersion '\d\+\.\d\+' contained nextgroup=yamlComment
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
77
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
78 execute 'syn match yamlReservedDirective contained nextgroup=yamlComment '.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
79 \string('%\%(\%(TAG\|YAML\)\s\)\@!'.s:ns_directive_name)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
81 syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start='"' skip='\\"' end='"'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
82 \ contains=yamlEscape
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
83 \ nextgroup=yamlKeyValueDelimiter
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
84 syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start="'" skip="''" end="'"
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
85 \ contains=yamlSingleEscape
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
86 \ nextgroup=yamlKeyValueDelimiter
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
87 syn match yamlEscape contained '\\\%([\\"abefnrtv\^0_ NLP\n]\|x\x\x\|u\x\{4}\|U\x\{8}\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
88 syn match yamlSingleEscape contained "''"
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
89
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
90 syn match yamlBlockScalarHeader contained '\s\+\zs[|>]\%([+-]\=[1-9]\|[1-9]\=[+-]\)\='
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
91
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
92 syn cluster yamlFlow contains=yamlFlowString,yamlFlowMapping,yamlFlowCollection
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
93 syn cluster yamlFlow add=yamlFlowMappingKey,yamlFlowMappingMerge
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
94 syn cluster yamlFlow add=yamlConstant,yamlPlainScalar,yamlFloat
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
95 syn cluster yamlFlow add=yamlTimestamp,yamlInteger,yamlMappingKeyStart
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
96 syn cluster yamlFlow add=yamlComment
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
97 syn region yamlFlowMapping matchgroup=yamlFlowIndicator start='{' end='}' contains=@yamlFlow
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
98 syn region yamlFlowCollection matchgroup=yamlFlowIndicator start='\[' end='\]' contains=@yamlFlow
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
99
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
100 execute 'syn match yamlPlainScalar /'.s:ns_plain_out.'/'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
101 execute 'syn match yamlPlainScalar contained /'.s:ns_plain_in.'/'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
102
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
103 syn match yamlMappingKeyStart '?\ze\s'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
104 syn match yamlMappingKeyStart '?' contained
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
105
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
106 execute 'syn match yamlFlowMappingKey /'.s:ns_plain_in.'\ze\s*:/ contained '.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
107 \'nextgroup=yamlKeyValueDelimiter'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
108 syn match yamlFlowMappingMerge /<<\ze\s*:/ contained nextgroup=yamlKeyValueDelimiter
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
109
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
110 syn match yamlBlockCollectionItemStart '^\s*\zs-\%(\s\+-\)*\s' nextgroup=yamlBlockMappingKey,yamlBlockMappingMerge
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
111 execute 'syn match yamlBlockMappingKey /^\s*\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ '.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
112 \'nextgroup=yamlKeyValueDelimiter'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
113 execute 'syn match yamlBlockMappingKey /\s*\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ contained '.
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
114 \'nextgroup=yamlKeyValueDelimiter'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
115 syn match yamlBlockMappingMerge /^\s*\zs<<\ze:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
116 syn match yamlBlockMappingMerge /<<\ze\s*:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
118 syn match yamlKeyValueDelimiter /\s*:/ contained
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
119 syn match yamlKeyValueDelimiter /\s*:/ contained
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
120
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
121 syn keyword yamlConstant true True TRUE false False FALSE
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
122 syn keyword yamlConstant null Null NULL
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
123 syn match yamlConstant '\<\~\>'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
124
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
125 syn match yamlTimestamp /\%([\[\]{}, \t]\@!\p\)\@<!\%(\d\{4}-\d\d\=-\d\d\=\%(\%([Tt]\|\s\+\)\%(\d\d\=\):\%(\d\d\):\%(\d\d\)\%(\.\%(\d*\)\)\=\%(\s*\%(Z\|[+-]\d\d\=\%(:\d\d\)\=\)\)\=\)\=\)\%([\[\]{}, \t]\@!\p\)\@!/
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
126
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2581
diff changeset
127 syn match yamlInteger /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(0\%(b[0-1_]\+\|[0-7_]\+\|x[0-9a-fA-F_]\+\)\=\|\%([1-9][0-9_]*\%(:[0-5]\=\d\)\+\)\)\|[1-9][0-9_]*\)\%([\[\]{}, \t]\@!\p\)\@!/
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
128 syn match yamlFloat /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(\%(\d[0-9_]*\)\.[0-9_]*\%([eE][+-]\d\+\)\=\|\.[0-9_]\+\%([eE][-+][0-9]\+\)\=\|\d[0-9_]*\%(:[0-5]\=\d\)\+\.[0-9_]*\|\.\%(inf\|Inf\|INF\)\)\|\%(\.\%(nan\|NaN\|NAN\)\)\)\%([\[\]{}, \t]\@!\p\)\@!/
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
130 execute 'syn match yamlNodeTag '.string(s:c_ns_tag_property)
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
131 execute 'syn match yamlAnchor '.string(s:c_ns_anchor_property)
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
132 execute 'syn match yamlAlias '.string(s:c_ns_alias_node)
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
133
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
134 syn match yamlDocumentStart '^---\ze\%(\s\|$\)'
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
135 syn match yamlDocumentEnd '^\.\.\.\ze\%(\s\|$\)'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
137 hi def link yamlTodo Todo
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
138 hi def link yamlComment Comment
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
139
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
140 hi def link yamlDocumentStart PreProc
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
141 hi def link yamlDocumentEnd PreProc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
143 hi def link yamlDirectiveName Keyword
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
145 hi def link yamlTAGDirective yamlDirectiveName
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
146 hi def link yamlTagHandle String
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
147 hi def link yamlTagPrefix String
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
149 hi def link yamlYAMLDirective yamlDirectiveName
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
150 hi def link yamlReservedDirective Error
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
151 hi def link yamlYAMLVersion Number
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
152
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
153 hi def link yamlString String
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
154 hi def link yamlFlowString yamlString
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
155 hi def link yamlFlowStringDelimiter yamlString
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
156 hi def link yamlEscape SpecialChar
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
157 hi def link yamlSingleEscape SpecialChar
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
158
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
159 hi def link yamlBlockCollectionItemStart Label
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
160 hi def link yamlBlockMappingKey Identifier
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
161 hi def link yamlBlockMappingMerge Special
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
162
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
163 hi def link yamlFlowMappingKey Identifier
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
164 hi def link yamlFlowMappingMerge Special
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
165
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
166 hi def link yamlMappingKeyStart Special
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
167 hi def link yamlFlowIndicator Special
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
168 hi def link yamlKeyValueDelimiter Special
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
169
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
170 hi def link yamlConstant Constant
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
171
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
172 hi def link yamlAnchor Type
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
173 hi def link yamlAlias Type
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
174 hi def link yamlNodeTag Type
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
175
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
176 hi def link yamlInteger Number
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
177 hi def link yamlFloat Float
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
178 hi def link yamlTimestamp Number
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 let b:current_syntax = "yaml"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
182 unlet s:ns_word_char s:ns_uri_char s:c_verbatim_tag s:c_named_tag_handle s:c_secondary_tag_handle s:c_primary_tag_handle s:c_tag_handle s:ns_tag_char s:c_ns_shorthand_tag s:c_non_specific_tag s:c_ns_tag_property s:c_ns_anchor_char s:c_ns_anchor_name s:c_ns_anchor_property s:c_ns_alias_node s:ns_char s:ns_directive_name s:ns_local_tag_prefix s:ns_global_tag_prefix s:ns_tag_prefix s:c_indicator s:ns_plain_safe_out s:c_flow_indicator s:ns_plain_safe_in s:ns_plain_first_in s:ns_plain_first_out s:ns_plain_char_in s:ns_plain_char_out s:ns_plain_out s:ns_plain_in
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
183
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
184 let &cpo = s:cpo_save
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
185 unlet s:cpo_save
2581
e8a482a7fa6c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2552
diff changeset
186