Pergunta

I recently ran across a post on Jay Fields' blog, in which Jay uses emacs' font-lock mode to change the display of words into symbols.

before after

Is there any way to do this in Vim?

Foi útil?

Solução

Yes, Vim's conceal feature replaces matches with a single replacement character (or none at all). This is integrated into syntax highlighting, see :help :syn-conceal.

For example, the built-in Tex filetype uses this to display special sequences directly as Greek characters etc.; see :help tex-conceal. The implementation is in runtime/syntax/tex.vim in the standard vim distribution.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top