1
1
nano/syntax/javascript.nanorc
Benno Schulenberg 1b5b52d2e4 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.
2017-12-25 15:36:35 +01:00

19 строки
593 B
Plaintext

## Here is an example for Javascript.
syntax "javascript" "\.js$"
comment "//"
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)\>"
# Strings.
color brightmagenta "<[^= ]*>" ""(\\.|[^"])*"" "'(\\.|[^'])*'" "`(\\.|[^`])*`"
# Comments.
color brightblue "(^|[[:space:]])//.*"
color brightblue start="/\*" end="\*/"
# Trailing whitespace.
color ,green "[[:space:]]+$"