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