Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Someone-Else
Vim
Commits
0fcd2376
Commit
0fcd2376
authored
14 years ago
by
Bram Moolenaar
Browse files
Options
Downloads
Patches
Plain Diff
Fix for Yaml syntax file. (Nikolai Weibull)
parent
6b6eedfc
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
runtime/syntax/yaml.vim
+8
-5
8 additions, 5 deletions
runtime/syntax/yaml.vim
with
8 additions
and
5 deletions
runtime/syntax/yaml.vim
+
8
−
5
View file @
0fcd2376
" Vim syntax file
" Language: YAML (YAML Ain't Markup Language)
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2010-0
5-30
" Latest Revision: 2010-0
8-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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment