aboutsummaryrefslogtreecommitdiff
path: root/ligature_plugins/ocaml.vim
diff options
context:
space:
mode:
authorNerdyPepper <[email protected]>2018-02-23 08:43:58 +0000
committerNerdyPepper <[email protected]>2018-02-23 08:43:58 +0000
commitd27987b28a122eb85cacea7b908f11b3884b297f (patch)
treeb5de74440f0655900b914904be8cc0207c85bf17 /ligature_plugins/ocaml.vim
parent12058cb9bc4b950d77c322fce6d134c5aed04eb6 (diff)
parent6604fbe1938c1edcae88e95ecf048504e4a38f93 (diff)
Merge branch 'master' of https://github.com/NerdyPepper/scientifica
Diffstat (limited to 'ligature_plugins/ocaml.vim')
-rw-r--r--ligature_plugins/ocaml.vim31
1 files changed, 31 insertions, 0 deletions
diff --git a/ligature_plugins/ocaml.vim b/ligature_plugins/ocaml.vim
new file mode 100644
index 0000000..14c78e5
--- /dev/null
+++ b/ligature_plugins/ocaml.vim
@@ -0,0 +1,31 @@
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 ocamlNiceOperator "<>" conceal cchar=≠
25
26" greek letters
27syntax match ocamlNiceTypes "'a" conceal cchar=α
28syntax match ocamlNiceTypes "'b" conceal cchar=β
29syntax match ocamlNiceTypes "'c" conceal cchar=γ
30syntax match ocamlNiceTypes "'d" conceal cchar=δ
31syntax match ocamlNiceTypes "'e" conceal cchar=ε