vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 8e158c7dd6b5d5953a590101fc1fbe467d69e085
parent 2b18c8ee30a26d342d539bc85b882d23fbce9900
Author: Dmitry Bogatov <KAction@gnu.org>
Date: Sat, 15 Aug 2015 00:54:25 +0300
Improve shell highlighting
* lower case variables names are now recognized
* special variables ($?, $*, etc) are treated specially
* non-sense, like ${foo is not treated as variable reference anymore
Diffstat:
| M | config.def.h | | | 8 | +++++++- |
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/config.def.h b/config.def.h @@ -982,7 +982,13 @@ static Syntax syntaxes[] = {{ "^[0-9A-Z_]+\\(\\)", &colors[COLOR_CONSTANT], },{ - "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?", + "\\$[?!@#$?*-]", + &colors[COLOR_VARIABLE], + },{ + "\\$\\{[A-Za-z_][0-9A-Za-z_]+\\}", + &colors[COLOR_VARIABLE], + },{ + "\\$[A-Za-z_][0-9A-Za-z_]+", &colors[COLOR_VARIABLE], },{ B"(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)"B,