Sublime Text 2:如何更改空白字符颜色? [英] Sublime Text 2: how to change white space characters color?
问题描述
颜色似乎与主题中的前景有关.我假设它使用较少的 alpha.有没有办法控制这个?
The color seems to be linked to the foreground in themes. I assume it's using less alpha. Is there a way to control this?
推荐答案
现在有一个用于此的 Sublime 插件.
There's now a Sublime plugin for this.
安装 HighlightWhitespaces 插件
将以下颜色设置(根据您的喜好量身定制)添加到您的 color_scheme 文件中.该文件以 .tmTheme
结尾,可以通过查看设置文件中color_scheme"键的值找到该路径.
Add the following color settings (tailored to your preference) to your color_scheme file. This file ends in .tmTheme
and the path can be found by looking at the value for the key "color_scheme" in your settings file.
<dict>
<key>name</key>
<string>highlight.whitespace</string>
<key>scope</key>
<string>highlight.whitespace</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#020202</string>
<key>foreground</key>
<string>#805050</string>
</dict>
</dict>
通过将以下内容添加到 HighlightWhitespaces 插件的用户设置中来指定应使用此颜色:
Specify that this color should be used by adding the following to the user settings of the HighlightWhitespaces plugin:
{
"highlight_whitespaces_space_highlight_scope_name": "highlight.whitespace",
"highlight_whitespaces_tab_highlight_scope_name": "highlight.whitespace",
"highlight_whitespaces_eol_highlight_scope_name": "highlight.whitespace",
"highlight_whitespaces_mixed_highlight_scope_name": "highlight.whitespace"
}
放松并享受:-)
Relax and enjoy :-)
这篇关于Sublime Text 2:如何更改空白字符颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!