diff options
author | Akshay <[email protected]> | 2018-02-15 10:54:16 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2018-02-15 10:54:16 +0000 |
commit | 6604fbe1938c1edcae88e95ecf048504e4a38f93 (patch) | |
tree | 5e0ac0cbeeea5ee5bc788334e178d03c773a5038 /ligature_plugins | |
parent | 2dead0a173d8f34af0caf7a4bb6d87de693844c2 (diff) | |
parent | 5d7fa8386681b0c04251339efd9276be77bfa852 (diff) |
Merge pull request #5 from warsawpact/master
OCaml ligature plugin
Diffstat (limited to 'ligature_plugins')
-rw-r--r-- | ligature_plugins/ocaml.vim | 31 |
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 | ||
4 | setlocal conceallevel=1 | ||
5 | |||
6 | " we need the conceal feature (vim ≥ 7.3) | ||
7 | if exists('g:no_ocaml_conceal') || !has('conceal') | ||
8 | finish | ||
9 | endif | ||
10 | |||
11 | " fun | ||
12 | syntax keyword ocamlNiceKeyword fun conceal cchar=λ | ||
13 | |||
14 | " -> | ||
15 | syntax match ocamlArrow /->/ contains=ocamlArrowM,ocamlArrowH | ||
16 | syntax match ocamlArrowM /-/ contained containedin=ocamlArrow conceal cchar= | ||
17 | syntax match ocamlArrowH /-\@<=>/ contained containedin=ocamlArrow conceal cchar=→ | ||
18 | |||
19 | " <- | ||
20 | syntax match ocamlArrow /<\ze-/ contains=ocamlArrowM,ocamlArrowH | ||
21 | syntax match ocamlArrowH /</ contained containedin=ocamlArrow conceal cchar=← | ||
22 | |||
23 | " <> | ||
24 | syntax match ocamlNiceOperator "<>" conceal cchar=≠ | ||
25 | |||
26 | " greek letters | ||
27 | syntax match ocamlNiceTypes "'a" conceal cchar=α | ||
28 | syntax match ocamlNiceTypes "'b" conceal cchar=β | ||
29 | syntax match ocamlNiceTypes "'c" conceal cchar=γ | ||
30 | syntax match ocamlNiceTypes "'d" conceal cchar=δ | ||
31 | syntax match ocamlNiceTypes "'e" conceal cchar=ε | ||