syntax: nanorc: colorize literal control codes, to make them stand out

This makes it easier to read string binds that contain control codes.
master
Benno Schulenberg 2021-05-14 14:22:09 +02:00
parent 51adf02d34
commit 7993fc8b12
1 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,9 @@ color green "^[[:blank:]]*((un)?(bind|set)|include|syntax|header|magic|comment|f
# Strings
color brightmagenta "([[:blank:]]|(start|end)=)".+"([[:blank:]]|$)"
# Control codes
color bold,pink "[[:cntrl:]]"
# Colors
color yellow "^[[:blank:]]*i?color[[:blank:]]*(bold,)?(italic,)?(bright|light)?(white|black|red|blue|green|yellow|magenta|cyan|normal|pink|purple|mauve|lagoon|mint|lime|peach|orange|latte)?(,(light)?(white|black|red|blue|green|yellow|magenta|cyan|normal|pink|purple|mauve|lagoon|mint|lime|peach|orange|latte))?\>"
color magenta "^[[:blank:]]*i?color\>" "\<(start|end)="