From 02eaa4ce6dc7f887969cd68be5cc42e3c04c9f63 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 3 Nov 2018 21:20:06 +0100 Subject: [PATCH] tweaks: fold a few pairs of regexes into each other --- syntax/awk.nanorc | 3 +-- syntax/cmake.nanorc | 3 +-- syntax/mgp.nanorc | 3 +-- syntax/postgresql.nanorc | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/syntax/awk.nanorc b/syntax/awk.nanorc index 04edbbb7..20d76db0 100644 --- a/syntax/awk.nanorc +++ b/syntax/awk.nanorc @@ -19,8 +19,7 @@ color green "(\{|\}|\(|\)|\;|\]|\[|\\|<|>|!|=|&|\+|-|\*|%|/|\?:|\^|\|)" color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>" color brightyellow "\<(break|continue|return)\>" # I/O statements. -color brightgreen "\<(close|getline|next|nextfile|print|printf)\>" -color brightgreen "\<(system|fflush)\>" +color brightgreen "\<(close|fflush|getline|next|nextfile|print|printf|system)\>" # Standard functions. color magenta "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>" color magenta "\<(asort|asorti|gensub|gsub|index|length|match)\>" diff --git a/syntax/cmake.nanorc b/syntax/cmake.nanorc index 358f80b4..a89a93de 100644 --- a/syntax/cmake.nanorc +++ b/syntax/cmake.nanorc @@ -15,6 +15,5 @@ icolor brightred "^[[:space:]]*((end)?(function|macro)|return)" icolor cyan start="\$(\{|ENV\{)" end="\}" color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>" -icolor brightblue "^([[:space:]]*)?#.*" -icolor brightblue "[[:space:]]#.*" +color brightblue "(^|[[:space:]])#.*" color ,green "[[:space:]]+$" diff --git a/syntax/mgp.nanorc b/syntax/mgp.nanorc index a030b1cc..7a6324f6 100644 --- a/syntax/mgp.nanorc +++ b/syntax/mgp.nanorc @@ -5,6 +5,5 @@ header "^%include.*" comment "#" icolor green "^%[a-z].*" -color cyan "(^|[[:space:]])#.*" -color cyan "(^|[[:space:]])%%.*" +color cyan "(^|[[:space:]])(#|%%).*" color ,green "[[:space:]]+$" diff --git a/syntax/postgresql.nanorc b/syntax/postgresql.nanorc index d15415dc..d90344a7 100644 --- a/syntax/postgresql.nanorc +++ b/syntax/postgresql.nanorc @@ -59,9 +59,8 @@ color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" color green "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" # Comments. -color red "#[^{].*" "#$" +color red "##?[^{].*" "##?$" color red "--[^{].*" "--$" -color red "##[^{].*" "##$" color brightblue "//.*" color brightblue start="/\*" end="\*/"