1b5b52d2e4
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.
19 строки
593 B
Plaintext
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:]]+$"
|