更改 Sublime Text 3 主题中制表符的颜色

Change color of tab characters in Sublime Text 3 theme

我正在使用Fortran text highlighting package for ST3, and I am making a theme using this fantastic homepage

但是请看下图。在代码中 tab characters 处(不是缩进),它们被涂成粉红色。我如何更改或删除该颜色?

在首选项的默认文件设置中,您会看到更改缩进参考线的宽度和颜色的说明。

// Set to false to turn off the indentation guides.
// The color and width of the indent guides may be customized by editing
// the corresponding .tmTheme file, and specifying the colors "guide",
// "activeGuide" and "stackGuide"
"draw_indent_guides": true,

经过反复试验,我发现 属性 确实是 this page 上的一个变量,它被称为 Invalid。这也是 .tmTheme 文件中的名称。但是在网站上,示例代码(我看到的)中没有这样的字符,而且名称与我的代码中的制表符没有明显的关系。

粉红色实际上是主题编辑器网站上的默认 Invalid 颜色。

你应该删除那些,因为它们不应该在那里。它们被引用为 Invalid 标记,它可以显示弃用的迹象、不可读的代码等。它应该看起来像:

diff = first - second 

而不是

diff      = first    -  second

如果您真的想覆盖它,您可以编辑语法定义文件或在您的 User 文件夹中覆盖它。

  • 转到首选项 -> 浏览包 -> Fortran -> 语法

  • 打开FortranModern.sublime-syntaxFortranFixedForm.sublime-syntax

  • 删除以下行

# tabs are illegal - match: \t scope: invalid.illegal.tab.fortran

  • 完成了吗?

PS:解决此问题的 pull request 已经合并,因此下一个版本应该没问题