mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 22:29:42 +03:00
8492de53f7
Plus one that automake recognizes: if. Color them only at the start of a line. Also color all possible assignment sequences (surrounded by spaces to not color the ones in shell fragments), and add some comments.
25 lines
535 B
Plaintext
25 lines
535 B
Plaintext
## Here is an example for Makefiles.
|
|
|
|
syntax makefile "(/((GNU)?m|M)akefile[^/]*$|\.(make|mk)$)"
|
|
magic "makefile script"
|
|
comment "#"
|
|
|
|
# Assignments.
|
|
color red " (:?:|\+|\?)?= "
|
|
|
|
# Keywords.
|
|
color magenta "^(if|ifn?def|ifn?eq|else|endif|(-|s)?include)\>"
|
|
color magenta "^((override +)?(un)?define|endef|(un)?export|private|vpath)\>"
|
|
|
|
# Variable expansions.
|
|
color blue "\$+[{(][a-zA-Z0-9_-]+[})]"
|
|
|
|
# Targets.
|
|
color brightblue "^[^ ]+:"
|
|
|
|
# Comments.
|
|
color green "(^|[[:space:]]+)#.*"
|
|
|
|
# Trailing whitespace.
|
|
color ,green "[[:space:]]+$"
|