nano

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

commit 1b5b52d2e43eb56c3ff5c4c123733a3d4a475c28
parent ab62d28817ed7ba46aa04113aa9b99f0fe827d9d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 25 Dec 2017 15:27:08 +0100

syntax: javascript: color strings differently from major keywords

Also, remove the coloring of special single-quoted strings as they
get recolored by the subsequent general string-coloring command.

And remove the coloring of all-uppercase words, as other editors
do not color those either.

Diffstat:
Msyntax/javascript.nanorc | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/syntax/javascript.nanorc b/syntax/javascript.nanorc @@ -3,15 +3,13 @@ syntax "javascript" "\.js$" comment "//" -color brightred "\<[A-Z_][0-9A-Z_]+\>" color green "\<(async|class|const|extends|function|let|this|typeof|var|void)\>" color brightyellow "\<(for|if|while|with|do|else|case|default|switch)\>" color brightyellow "\<(await|export|import|try|throw|catch|new|delete)\>" color magenta "\<(continue|break|return|yield)\>" -color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" # Strings. -color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" "'(\\.|[^'])*'" "`(\\.|[^`])*`" +color brightmagenta "<[^= ]*>" ""(\\.|[^"])*"" "'(\\.|[^'])*'" "`(\\.|[^`])*`" # Comments. color brightblue "(^|[[:space:]])//.*" color brightblue start="/\*" end="\*/"