summaryrefslogtreecommitdiff
path: root/colm.vim
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2019-11-28 12:23:46 -0800
committerAdrian Thurston <thurston@colm.net>2019-11-28 14:49:17 -0800
commitb85782ac69f1ef0d145d7dd2e95c555fab3f8694 (patch)
tree6356495869a65693ae17ce47fb0180bf0dddb383 /colm.vim
parent78aadd87126695e60b5a2b6cdd40344dd69afcdd (diff)
downloadcolm-b85782ac69f1ef0d145d7dd2e95c555fab3f8694.tar.gz
allow backtick literals to have an end quote.
Rather than exclude ? + and *, exclude ` from literals and allow backtick literals to be end quoted. Allows us to follow the literal with an operator without using a space between the two, which is very unnatural. Can write: [`,`?]. If we forget to the end quote it we end up with literal that (probably) does not exist. It should generate an error, rather than silently give us something we don't want. Note that ] is still excluded from literals in positions 2+.
Diffstat (limited to 'colm.vim')
-rw-r--r--colm.vim3
1 files changed, 1 insertions, 2 deletions
diff --git a/colm.vim b/colm.vim
index 94ec8842..d05aacbb 100644
--- a/colm.vim
+++ b/colm.vim
@@ -40,8 +40,7 @@ syntax match char "\\." contained
syntax match otLit "\~.*$"
syntax match otLit "'\(\\.\|[^'\\]\)*\('[i]*\)\?"
-syntax match otLit "`[^ \t\r\]]\+"
-syntax match otLit "`\]"
+syntax match otLit "`[^ \t\r][^ \t\r\]`]*`\?"
"
" Other stuff