سؤال

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?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top