blob: fef4557b1bdb5249a1741e333c13c72631542c36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
" fork of https://gist.github.com/NicolasT/1043747
" set correct conceal
setlocal conceallevel=1
" we need the conceal feature (vim ≥ 7.3)
if exists('g:no_ocaml_conceal') || !has('conceal')
finish
endif
" fun
syntax keyword ocamlNiceKeyword fun conceal cchar=λ
" ->
syntax match ocamlArrow /->/ contains=ocamlArrowM,ocamlArrowH
syntax match ocamlArrowM /-/ contained containedin=ocamlArrow conceal cchar=
syntax match ocamlArrowH /-\@<=>/ contained containedin=ocamlArrow conceal cchar=→
" <-
syntax match ocamlArrow /<\ze-/ contains=ocamlArrowM,ocamlArrowH
syntax match ocamlArrowH /</ contained containedin=ocamlArrow conceal cchar=←
" =>
syntax match ocamlArrow /=>/ contains=ocamlArrowM,ocamlArrowH
syntax match ocamlArrowM /=/ contained containedin=ocamlArrow conceal cchar=
syntax match ocamlArrowH /=\@<=>/ contained containedin=ocamlArrow conceal cchar=⇒
" <>
syntax match ocamlNiceOperator "<>" conceal cchar=≠
" greek letters
syntax match ocamlNiceTypes "'a" conceal cchar=α
syntax match ocamlNiceTypes "'b" conceal cchar=β
syntax match ocamlNiceTypes "'c" conceal cchar=γ
syntax match ocamlNiceTypes "'d" conceal cchar=δ
syntax match ocamlNiceTypes "'e" conceal cchar=ε
|