Vim-style conceal functionality


Any thoughts on conceal functionality like vim has? By this I mean replacing (for display purposes only) certain characters with others for readability/aesthetics. For example consider the following bit of Haskell:

toDigitsRev :: Integer -> [Integer]
toDigitsRev = reverse . toDigits

Using vim-haskellConceal, it displays as

toDigitsRev ∷ Integer → [Integer]
toDigitsRev = reverse ∘ toDigits

while leaving the orginal characters in the source file. When editing a particular line, the original characters are used.


For the specific case of Haskell, there are certain fonts that offer ligatures to mimic some of the type of replacements you’re talking about:

For more complex replacements, there is this other topic discussing the possibility:

Closing this topic as a duplicate of the token substitutions topic.