Sorry, that was my Yaml test file (all the Yaml fragments from
the Wikipedia article).

Correct file is attached now.

Benno

## Syntax highlighting for YAML files.

## Original author:  Benno Schulenberg
## License:  GPL version 3 or newer

#### (Adjusted to work on older nanos -- V2.)

syntax "yaml" "\.ya?ml$"
header "^---"
comment "#"

# Keys:
color brightgreen "(\w|::|-)+:( |$)"
color brightgreen "\[(\w|::|[, -])+\]:( |$)"

# Values (booleans, numbers, octal/hex, dates, strings):
color brightmagenta "[:,] +(Y(es)?|No?|y(es)?|no?|[Tt]rue|[Ff]alse|[Oo](n|ff))( 
*[]}]|, | +#|$)"
color brightmagenta "[:,] +[+-]?[0-9]+(\.([0-9]+)?)?( *[]}]|, | +#|$)"
color brightmagenta " 0(o[0-7]+|x[0-9ABCDEFabcdef]+)( *[]}]|, | +#|$)"
color white "[:,]( |$)"
color brightmagenta " [12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])"
color brightmagenta "("[^"]+"|'[^']+')"

# Anchors and references:
color brightred " [&*]\w+( |$)"

# Symbols:
color brightblue "^(---|\.\.\.)( |$)" " [|>]([1-9]?[+-]|[+-][1-9]?)?$"
color yellow "(^ *- |[]{}[])"

# Types:
color green " !!(binary|bool|float|int|map|null|omap|seq|set|str)( |$)"
color green " !(\w|-)+( |$)"

# Mistakes (control codes,trailing space):
color ,red "[[:cntrl:]]| +$"

# Comments:
color cyan "(^| )#.*"

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to