syntax: default: colorize dates, URLs, and nano's release motto

And change the color for control codes, to be more visible.
master
Benno Schulenberg 2021-11-30 10:24:15 +01:00
parent 19e743c7e4
commit 8aaa57a573
1 changed files with 10 additions and 3 deletions

View File

@ -10,14 +10,21 @@ color cyan "^[[:blank:]]*#.*"
# Spaces in front of tabs.
color ,red " + +"
# Nano's name, including version.
color brightred "(GNU )?[Nn]ano [1-5]\.[0-9][-.[:alnum:]]*\>"
# Nano's release motto, then name plus version.
color italic,lime "\<[Nn]ano [1-6]\.[0-9][-.[:alnum:]]* "[^"]+""
color brightred "\<(GNU )?[Nn]ano [1-6]\.[0-9][-.[:alnum:]]*\>"
# Dates
color latte "\<[12][0-9]{3}\.(0[1-9]|1[012])\.(0[1-9]|[12][0-9]|3[01])\>"
# Email addresses.
color magenta "<[[:alnum:].%_+-]+@[[:alnum:].-]+\.[[:alpha:]]{2,}>"
# URLs.
color lightblue "\<https?://\S+\.\S+[^[:space:],.)]"
# Bracketed captions in certain config files.
color brightgreen "^\[[^][]+\]$"
# Control codes.
color latte "[[:cntrl:]]"
color orange "[[:cntrl:]]"