This syntax file displays unicode characters for some Scala operators and built-in functions, turning the following:
foo =>
foo <- bar
foo -> bar
2 <= 5
5 >= 2
2 == 2
2 === 2l
foo && bar
foo || bar
foo map bar
foo flatMap bar
into
foo ⇒
foo ← bar
foo → bar
2 ≤ 5
5 ≥ 2
2 ≟ 2
2 ≡ 2l
foo ∧ bar
foo ∨ bar
foo ∘ bar
foo ⤜ bar
Screenshot:
This does not – at any point – alter your source code. It simply uses Vim's
"conceal" feature to “hide” map
behind ∘
, etc. Whenever the cursor is at
a line with concealed text, the text will be expanded.
To install, simply put scala.vim
in ~/.vim/after/syntax
or use something
like Pathogen (recommended).
Vim ≥ 7.3 is required.
This plug-in is very much inspired by https://github.com/ehamberg/vim-cute-python and http://github.com/Twinside/vim-haskellConceal