nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 06ad77895ff14b0c12a073b5c64a392cab65791b
parent 2cbd4d29a0228d964faba0f1383a64cd18f29dc0
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 15 Nov 2021 15:28:18 +0100

syntax: python: colorize backslash escapes, such as \n and \xef

Reference: https://docs.python.org/3/reference/lexical_analysis.html

Diffstat:
Msyntax/python.nanorc | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/syntax/python.nanorc b/syntax/python.nanorc @@ -32,6 +32,10 @@ color brightred "(^|[[:blank:]])#.*" color brightgreen start="'''([^'),]|$)" end="(^|[^(\])'''" color brightgreen start=""""([^"),]|$)" end="(^|[^(\])"""" +# Backslash escapes. +color peach "\\($|[\'"abfnrtv]|[0-3]?[0-7]?[0-7]|x[[:xdigit:]]{2})" +color peach "\\(N\{[[:alpha:]]+\}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})" + # Reminders. color brightwhite,yellow "\<(FIXME|TODO|XXX)\>"