diff options
Diffstat (limited to 'syntax/ocaml.vim')
-rw-r--r-- | syntax/ocaml.vim | 13 |
1 files changed, 12 insertions, 1 deletions
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: |