Merge pull request #169 from yochem/master

Rewrote yaml.nanorc to improve syntax highlighting
This commit is contained in:
Anthony Scopatz 2018-05-04 12:14:18 -04:00 committed by GitHub
commit 848011a76c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 11 deletions

View File

@ -1,13 +1,21 @@
syntax "YAML" "\.ya?ml$" syntax yaml "\.ya?ml"
comment "#"
header "^---" "%YAML" header "^---" "%YAML"
color green "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) " # Values
color brightcyan "\<(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off)\>" color green "(:|^|\s)+\S+"
color brightcyan "\<(true|false)\>"
color red ":[[:space:]]" "\[" "\]" ":[[:space:]]+[|>]" "^[[:space:]]*- " # Keys
color brightyellow "[[:space:]][\*&][A-Za-z0-9]+" color red "(^|\s+).*+\s*:(\s|$)"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$" # Special values
color brightmagenta "^---" "^\.\.\." "^%YAML" "^%TAG" color yellow "[:-]\s+(true|false|null)\s*$"
color ,green "[[:space:]]+$" color yellow "[:-]\s+[0-9]+\.?[0-9]*(\s*($|#))"
color ,red " + +| + +" color yellow "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
# Separator
color brightwhite "^\s+-"
color brightwhite ":(\s|\t|$)"
# Comments
color white "(^|[[:space:]])#.*$"