【问题标题】:How to change the color of the font in .txt files?如何更改 .txt 文件中字体的颜色?
【发布时间】:2021-03-27 07:15:08
【问题描述】:

我想更改 .txt 文件中文本的颜色。

更具体地说,我希望它使用与脚本中注释行相同的颜色。

我该怎么做?

谢谢!

【问题讨论】:

  • 你的问题太模糊了。有几种方法可以改变字体的颜色,哪一种最适用取决于你希望 Vim 的行为方式。我建议你研究一下“colorscheme”和“syntax highlighting”等概念。

标签: vim fonts colors neovim


【解决方案1】:

举个例子,

~/.vim/after/syntax/text.vim

syntax region textAll start=/\%^/ end=/\%$/
highlight default link textAll Comment

另请阅读:help syntax.txt

【讨论】:

  • 谢谢!会检查出来
猜你喜欢
  • 2017-01-10
  • 1970-01-01
  • 1970-01-01
  • 2020-04-04
  • 1970-01-01
  • 1970-01-01
  • 2015-05-18
  • 2011-05-20
  • 2012-04-08
相关资源
最近更新 更多