neovimhaskell / haskell-vim

Custom Haskell Vimscripts
BSD 2-Clause "Simplified" License
681 stars 84 forks source link

Feature request - visually replace the \ in lambda expressions to λ #130

Open ayhon opened 3 years ago

ayhon commented 3 years ago

Some other plugins achieve something similar, like vimtex, which replaces some expressions in math blocks with their unicode representation.

For example, this expression image

transforms into the following when the cursor is not over that line

image

Since in haskell lambda expressions we use \ because of its similarities with λ, I thought we might as well make \ look like λ in the same way vimtex transforms the \sum into .

To be honest, I don't know how difficult this would be to implement, and I understand that some people might prefer not to use this feature. But as an opt-in option, I think it might be worth it.