mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-13 22:37:21 +03:00
6a2032f5b0
This allows for commenting or uncommenting a line or a bunch of lines with a single keystroke (default binding: M-3). The characters used for commenting/uncommenting are specified by the active syntax file. Reviewed-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Mike Scalora <mike@scalora.org>
33 lines
723 B
Plaintext
33 lines
723 B
Plaintext
## Here is an example for PHP.
|
|
|
|
syntax "php" "\.php[2345s~]?$"
|
|
magic "PHP script text"
|
|
comment "//"
|
|
|
|
# PHP markings.
|
|
color brightgreen "(<\?(php)?|\?>)"
|
|
|
|
# Functions.
|
|
color white "\<[a-z_]*\("
|
|
|
|
# Types.
|
|
color green "\<(var|float|global|double|bool|char|int|enum|const)\>"
|
|
|
|
# Structure.
|
|
color brightyellow "\<(class|new|private|public|function|for|foreach|if|while|do|else|elseif|case|default|switch)\>"
|
|
|
|
# Control flow.
|
|
color magenta "\<(goto|continue|break|return)\>"
|
|
|
|
# Strings.
|
|
color brightyellow "<[^= ]*>" ""(\.|[^"])*""
|
|
|
|
# Comments.
|
|
color brightblue "//.*"
|
|
color brightblue start="/\*" end="\*/"
|
|
##color blue start="<" end=">"
|
|
##color red "&[^;[:space:]]*;"
|
|
|
|
# Trailing whitespace.
|
|
color ,green "[[:space:]]+$"
|