From f0122eaf4e552ff18c9187cf23d4782a5c96e7b3 Mon Sep 17 00:00:00 2001
From: TerraTech <1118433+TerraTech@users.noreply.github.com>
Date: Wed, 24 Apr 2019 21:58:31 -0400
Subject: [PATCH] sh.syntax: Allow for indented 'function' highlighting
This will allow for the following:
if want_foo; then
function foobar() {
echo "foo"
}
else
function foobar() {
echo "bar"
}
fi
foobar
Signed-off-by: TerraTech <1118433+TerraTech@users.noreply.github.com>
---
misc/syntax/sh.syntax | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/misc/syntax/sh.syntax b/misc/syntax/sh.syntax
index 032433ee8..051d996a9 100644
a
|
b
|
context default |
40 | 40 | |
41 | 41 | keyword $ brightgreen |
42 | 42 | |
43 | | keyword wholeleft linestart function*() brightmagenta |
44 | | keyword wholeleft linestart function\[\s\]+ brightmagenta |
| 43 | keyword wholeleft linestart \[\s\]*function*() brightmagenta |
| 44 | keyword wholeleft linestart \[\s\]*function\[\s\]+ brightmagenta |
45 | 45 | keyword wholeright +() brightmagenta |
46 | 46 | |
47 | 47 | wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._ |