主题中颜色似乎与前景相关联。我猜它使用了更少的 alpha(透明度)。是否有一种方法来控制这个?
主题中颜色似乎与前景相关联。我猜它使用了更少的 alpha(透明度)。是否有一种方法来控制这个?
Install the HighlightWhitespaces plugin
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>
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 :-)
您可能想尝试从“Package Control”安装PersistentRegexHighlight,然后使用空格正则表达式[\x20 ]
来添加特定的颜色或颜色范围。
您需要将此与Sublime用户首选项中的drawWhiteSpace:“all”,
相结合使用。
draw_white_space
。 - d_raildraw_white_space
has three values: none
, selection
(default), and all
- Don Wilson"draw_white_space": "all"
和模式为一个或多个制表符和空格的出现,即 [ \t]+
在 PersistentRegexHighlight 用户设置中,我还必须设置 "color_scope": "highlight.whitespace"
并将以下字典添加到主题中,以及其他设置数组中的其他项:<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>