summaryrefslogtreecommitdiffstats
path: root/syntax/ocaml.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-11-12 21:56:06 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2019-11-12 21:56:06 +0100
commit0c79dd3e73e8e09b73d4a5d20bf470a3f6f715f2 (patch)
tree5b5e45e53e9ecafa6c182c8ce7e0266e34388e4d /syntax/ocaml.vim
parent4e95df7c7e12cb76e781f2dacf1c07f8984cce58 (diff)
downloadvim-polyglot-0c79dd3e73e8e09b73d4a5d20bf470a3f6f715f2.tar.gz
vim-polyglot-0c79dd3e73e8e09b73d4a5d20bf470a3f6f715f2.zip
Update
Diffstat (limited to 'syntax/ocaml.vim')
-rw-r--r--syntax/ocaml.vim13
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: