neatvi

[fork] simple vi-type editor with UTF-8 support
git clone git://src.adamsgaard.dk/neatvi # fast
git clone https://src.adamsgaard.dk/neatvi.git # slow
Log | Files | Refs | README Back to index

commit f5724e9c44c13c54ff36dd080804a3c0e01877b7
parent e9a16a0778855b2c376333537b8331bdced600e6
Author: Ali Gholami Rudi <ali@rudi.ir>
Date:   Thu, 15 Oct 2020 16:57:19 +0330

conf.h: highlight shell keywords and variables

Diffstat:
Mconf.h | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/conf.h b/conf.h @@ -63,9 +63,13 @@ static struct highlight { {"mk", {0, SYN_BD}, "([A-Za-z_%.]+):"}, /* shell script */ + {"sh", {5 | SYN_BD}, "\\<(break|case|continue|do|done|elif|else|esac|fi|for|if|in|then|until|while)\\>"}, {"sh", {2 | SYN_IT}, "#.*$"}, - {"sh", {4}, "\"([^\"]|\\\\\")*\""}, - {"sh", {4}, "\'[^\']*\'"}, + {"sh", {4}, "\"([^\"\\]|\\\\.)*\""}, + {"sh", {4}, "'[^']*'"}, + {"sh", {4}, "`([^`\\]|\\\\.)*`"}, + {"sh", {1}, "\\$(\\{[^}]+\\}|[a-zA-Z_0-9]+)"}, + {"sh", {0, SYN_BD}, "^([a-zA-Z_][a-zA-Z_0-9]*\\(\\)).*\\{"}, /* neatmail */ {"nm", {0 | SYN_BGMK(15), 6 | SYN_BD, 12 | SYN_BD, 5, 8 | SYN_BD},