aboutsummaryrefslogtreecommitdiff
path: root/ligature_plugins
diff options
context:
space:
mode:
authorKaiwen Li <[email protected]>2018-02-14 23:40:54 +0000
committerGitHub <[email protected]>2018-02-14 23:40:54 +0000
commit44d1bf26705bb272fb86ff1b0bdb542bda6e8242 (patch)
tree5876c5090bb8e635dd0610d63ba0ae4bfd7067f4 /ligature_plugins
parent2dead0a173d8f34af0caf7a4bb6d87de693844c2 (diff)
Add ocaml.vim
Diffstat (limited to 'ligature_plugins')
-rw-r--r--ligature_plugins/ocaml.vim36
1 files changed, 36 insertions, 0 deletions
diff --git a/ligature_plugins/ocaml.vim b/ligature_plugins/ocaml.vim
new file mode 100644
index 0000000..fef4557
--- /dev/null
+++ b/ligature_plugins/ocaml.vim
@@ -0,0 +1,36 @@
1" fork of https://gist.github.com/NicolasT/1043747
2
3" set correct conceal
4setlocal conceallevel=1
5
6" we need the conceal feature (vim ≥ 7.3)
7if exists('g:no_ocaml_conceal') || !has('conceal')
8 finish
9endif
10
11" fun
12syntax keyword ocamlNiceKeyword fun conceal cchar=λ
13
14" ->
15syntax match ocamlArrow /->/ contains=ocamlArrowM,ocamlArrowH
16syntax match ocamlArrowM /-/ contained containedin=ocamlArrow conceal cchar=
17syntax match ocamlArrowH /-\@<=>/ contained containedin=ocamlArrow conceal cchar=→
18
19" <-
20syntax match ocamlArrow /<\ze-/ contains=ocamlArrowM,ocamlArrowH
21syntax match ocamlArrowH /</ contained containedin=ocamlArrow conceal cchar=←
22
23" =>
24syntax match ocamlArrow /=>/ contains=ocamlArrowM,ocamlArrowH
25syntax match ocamlArrowM /=/ contained containedin=ocamlArrow conceal cchar=
26syntax match ocamlArrowH /=\@<=>/ contained containedin=ocamlArrow conceal cchar=⇒
27
28" <>
29syntax match ocamlNiceOperator "<>" conceal cchar=≠
30
31" greek letters
32syntax match ocamlNiceTypes "'a" conceal cchar=α
33syntax match ocamlNiceTypes "'b" conceal cchar=β
34syntax match ocamlNiceTypes "'c" conceal cchar=γ
35syntax match ocamlNiceTypes "'d" conceal cchar=δ
36syntax match ocamlNiceTypes "'e" conceal cchar=ε