summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-10-12 12:27:19 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-10-12 12:27:19 +0100
commit1bf5a1eee5abc881ceb3efec0a215c1644df3da1 (patch)
treea19f9c0d1318213915ac54153ed224d7404aa15d
parentcbf4d3db3fa59b3391f1cbb9c781cd6a79eb0eae (diff)
Improve sh highlighting
-rw-r--r--rc/sh.kak6
1 files changed, 3 insertions, 3 deletions
diff --git a/rc/sh.kak b/rc/sh.kak
index 38639070..2a45f73c 100644
--- a/rc/sh.kak
+++ b/rc/sh.kak
@@ -7,15 +7,15 @@ hook global BufSetOption mimetype=text/x-shellscript %{
}
addhl -group / regions -default code sh \
- double_string %{(^|\h)"} %{(?<!\\)(\\\\)*"} '' \
- single_string %{(^|\h)'} %{(?<!\\)(\\\\)*'} '' \
+ double_string %{"} %{(?<!\\)(\\\\)*"} '' \
+ single_string %{'} %{(?<!\\)(\\\\)*'} '' \
comment '#' '$' ''
addhl -group /sh/double_string fill string
addhl -group /sh/single_string fill string
addhl -group /sh/comment fill comment
-addhl -group /sh/code regex \<(if|then|fi|while|for|do|done|case|esac|echo|cd|shift|return|exit|local)\> 0:keyword
+addhl -group /sh/code regex \<(if|then|else|elif|fi|while|for|do|done|case|esac|echo|cd|shift|return|exit|local)\> 0:keyword
addhl -group /sh/code regex [\[\]\(\)&|]{2} 0:operator
addhl -group /sh/code regex (\w+)= 1:identifier
addhl -group /sh/code regex ^\h*(\w+)\h*\(\) 1:identifier