|
|
@ -157,3 +157,44 @@ set is hlsearch ai ic scs |
|
|
|
nnoremap <esc><esc> :nohls<cr> |
|
|
|
|
|
|
|
EOF |
|
|
|
|
|
|
|
protect_pre_install /usr/share/nano/yaml.nanorc |
|
|
|
|
|
|
|
cat << EOF > /usr/share/nano/yaml.nanorc |
|
|
|
# Supports `YAML` files |
|
|
|
syntax "YAML" "\.ya?ml$" |
|
|
|
header "^(---|===)" "%YAML" |
|
|
|
|
|
|
|
## Keys |
|
|
|
color brightmagenta "^\s*[\$A-Za-z0-9_-]+\:" |
|
|
|
color brightmagenta "^\s*@[\$A-Za-z0-9_-]+\:" |
|
|
|
|
|
|
|
## Values |
|
|
|
color yellow ":\s.+$" |
|
|
|
## Booleans |
|
|
|
icolor brightcyan " (y|yes|n|no|true|false|on|off)$" |
|
|
|
## Numbers |
|
|
|
color brightred " [[:digit:]]+(\.[[:digit:]]+)?" |
|
|
|
## Arrays |
|
|
|
color red "\[" "\]" ":\s+[|>]" "^\s*- " |
|
|
|
## Reserved |
|
|
|
color green "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) " |
|
|
|
|
|
|
|
## Comments |
|
|
|
color cyan "#.*$" |
|
|
|
|
|
|
|
## Errors |
|
|
|
##color ,red ":\w.+$" |
|
|
|
##color ,red ":'.+$" |
|
|
|
##color ,red ":".+$" |
|
|
|
##color ,red "\s+$" |
|
|
|
|
|
|
|
## Non closed quote |
|
|
|
color ,red "['\"][^['\"]]*$" |
|
|
|
|
|
|
|
## Closed quotes |
|
|
|
color yellow "['\"].*['\"]" |
|
|
|
|
|
|
|
## Equal sign |
|
|
|
color white ":( |$)" |
|
|
|
EOF |