After much Googling I have been unable to make Vim's code conceal feature work with Javascript and Typescript (without requiring a plugin).
I have been trying to use lines like the following in my .vimrc
to conceal my code but without any luck:
syntax keyword Normal function conceal cchar=λ
syntax keyword Keyword return conceal cchar=>
Aim:
// Actual
function sum(a) {
return function inner(b) {
return a + b
}
}
// Displayed
λ sum a
> inner b
> a + b
Goals:
- Replace
function
with the lambda symbol - Replace
return
with the > symbol - Replace
[name]([args])
withname args
- Conceal the
{
- Conceal the
}