···11+# Ligatures and Unicode substitution
22+33+These features are supported *in vim only*.
44+55+### Installation
66+77+Symlink the required vim plugins to
88+99+ - `~/.vim/after/syntax/` (vim)
1010+ - `~/.config/nvim/after/syntax/` (neovim)
1111+1212+ ```shell
1313+ #vim
1414+ cd ~/scientifica/ligature_plugins/
1515+ for i in `ls *.vim`; do
1616+ ln -sf ~/scientifica/ligature_plugins/"$i" ~/.vim/after/syntax/"$i"
1717+ done
1818+1919+ #nvim
2020+ cd ~/scientifica/ligature_plugins/
2121+ for i in `ls *.vim`; do
2222+ ln -sf ~/scientifica/ligature_plugins/"$i" ~/.config/nvim/after/syntax/"$i"
2323+ done
2424+ ```
2525+2626+Haskell in vim with scientifica:
2727+
2828+2929+Credits go to [romeovs](https://github.com/romeovs/) for the haskell plugin.
3030+Credits go to [ehamberg](https://github.com/ehamberg/vim-cute-python) for the python plugin.
3131+3232+Both plugins have been modified (haskell.vim especially) to play well with scientifica.
3333+If you need ligatures for other languages, just open an issue, with the language and the ligature sequence.
+1-1
ligature_plugins/haskell.vim
···334455" set correct conceal
66-set conceallevel=1
66+setlocal conceallevel=1
7788" lambda's
99syntax match hsLambda "\\" conceal cchar=λ
+37
ligature_plugins/python.vim
···11+" This is a fork of vim-cute-python
22+" with a few character replacements to
33+" play well with scientifica
44+55+" we need the conceal feature (vim ≥ 7.3)
66+if !has('conceal')
77+ finish
88+endif
99+1010+" remove the keywords. we'll re-add them below
1111+syntax clear pythonOperator
1212+1313+syntax match pythonOperator "\<is\>"
1414+1515+syntax match pyNiceOperator "\<in\>" conceal cchar=∈
1616+syntax match pyNiceOperator "\<or\>" conceal cchar=∨
1717+syntax match pyNiceOperator "\<and\>" conceal cchar=∧
1818+" include the space after “not” – if present – so that “not a” becomes “¬a”.
1919+" also, don't hide “not” behind ‘¬’ if it is after “is ”.
2020+syntax match pyNiceOperator "<=" conceal cchar=≤
2121+syntax match pyNiceOperator ">=" conceal cchar=≥
2222+" only conceal “==” if alone, to avoid concealing SCM conflict markers
2323+syntax match pyNiceOperator "=\@<!===\@!" conceal cchar=≡
2424+syntax match pyNiceOperator "!=" conceal cchar=≠
2525+2626+syntax keyword pyNiceOperator sum conceal cchar=∑
2727+syntax match pyNiceOperator "\<\%(math\.\)\?sqrt\>" conceal cchar=√
2828+syntax match pyNiceKeyword "\<\%(math\.\)\?pi\>" conceal cchar=π
2929+3030+syntax keyword pyNiceStatement lambda conceal cchar=λ
3131+3232+hi link pyNiceOperator Operator
3333+hi link pyNiceStatement Statement
3434+hi link pyNiceKeyword Keyword
3535+hi! link Conceal Operator
3636+3737+setlocal conceallevel=1