Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近在 Jay Fields 的博客上看到一篇文章,其中 Jay 使用 emacs 的字体锁定模式将单词的显示更改为符号。
在 Vim 中有没有办法做到这一点?
是的,Vim 的隐藏功能用单个替换字符替换匹配项(或根本没有)。这已集成到语法突出显示中,请参阅:help :syn-conceal.
:help :syn-conceal
例如,内置的Tex文件类型使用它来将特殊序列直接显示为希腊字符等;见:help tex-conceal。该实现在runtime/syntax/tex.vim标准 vim 发行版中。
:help tex-conceal
runtime/syntax/tex.vim