From 0c79dd3e73e8e09b73d4a5d20bf470a3f6f715f2 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 12 Nov 2019 21:56:06 +0100 Subject: Update --- syntax/ocaml.vim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'syntax/ocaml.vim') diff --git a/syntax/ocaml.vim b/syntax/ocaml.vim index 2058821e..6e6cf225 100644 --- a/syntax/ocaml.vim +++ b/syntax/ocaml.vim @@ -230,7 +230,18 @@ syn match ocamlStar "*" syn match ocamlAngle "<" syn match ocamlAngle ">" " Custom indexing operators: -syn match ocamlIndexingOp "\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\(()\|\[]\|{}\)\(<-\)\?" +syn region ocamlIndexing matchgroup=ocamlIndexingOp + \ start="\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\_s*(" + \ end=")\(\_s*<-\)\?" + \ contains=ALLBUT,@ocamlContained,ocamlParenErr +syn region ocamlIndexing matchgroup=ocamlIndexingOp + \ start="\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\_s*\[" + \ end="]\(\_s*<-\)\?" + \ contains=ALLBUT,@ocamlContained,ocamlBrackErr +syn region ocamlIndexing matchgroup=ocamlIndexingOp + \ start="\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\_s*{" + \ end="}\(\_s*<-\)\?" + \ contains=ALLBUT,@ocamlContained,ocamlBraceErr " Extension operators (has to be declared before regular infix operators): syn match ocamlExtensionOp "#[#~?!.:|&$%<=>@^*/+-]\+" " Infix and prefix operators: -- cgit v1.2.3