mirror of
https://github.com/scopatz/nanorc
synced 2024-11-22 08:35:39 +01:00
Merge pull request #169 from yochem/master
Rewrote yaml.nanorc to improve syntax highlighting
This commit is contained in:
commit
848011a76c
30
yaml.nanorc
30
yaml.nanorc
@ -1,13 +1,21 @@
|
||||
syntax "YAML" "\.ya?ml$"
|
||||
syntax yaml "\.ya?ml"
|
||||
comment "#"
|
||||
header "^---" "%YAML"
|
||||
|
||||
color green "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
|
||||
color brightcyan "\<(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off)\>"
|
||||
color brightcyan "\<(true|false)\>"
|
||||
color red ":[[:space:]]" "\[" "\]" ":[[:space:]]+[|>]" "^[[:space:]]*- "
|
||||
color brightyellow "[[:space:]][\*&][A-Za-z0-9]+"
|
||||
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
|
||||
color brightblack "(^|[[:space:]])#([^{].*)?$"
|
||||
color brightmagenta "^---" "^\.\.\." "^%YAML" "^%TAG"
|
||||
color ,green "[[:space:]]+$"
|
||||
color ,red " + +| + +"
|
||||
# Values
|
||||
color green "(:|^|\s)+\S+"
|
||||
|
||||
# Keys
|
||||
color red "(^|\s+).*+\s*:(\s|$)"
|
||||
|
||||
# Special values
|
||||
color yellow "[:-]\s+(true|false|null)\s*$"
|
||||
color yellow "[:-]\s+[0-9]+\.?[0-9]*(\s*($|#))"
|
||||
color yellow "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
|
||||
|
||||
# Separator
|
||||
color brightwhite "^\s+-"
|
||||
color brightwhite ":(\s|\t|$)"
|
||||
|
||||
# Comments
|
||||
color white "(^|[[:space:]])#.*$"
|
||||
|
Loading…
Reference in New Issue
Block a user