在 Sublime 中更改标尺的颜色
Change the color of the rulers in Sublime
如何在 Sublime 中更改标尺的颜色,我似乎找不到设置此颜色的代码:
在构建 3150 之前,必须使用一种解决方法来设置标尺颜色 - 见下文。 Build 3150 及之后的配色方案支持 rulers
颜色。 (https://github.com/SublimeTextIssues/Core/issues/1830)
CursorRuler plugin has a guide for this in it's Readme.
Ruler Colors
Speaking of ruler visual style, there's apparently no way to set the
color of rulers directly. Rulers get their colors from your color
scheme's foreground and background settings. The background setting
overrides the foreground setting.
Despite the current lack of ability to directly set colors for rulers
(as of ST2 build 2219 and ST3 build 3030) there's thankfully a
workaround for it described here.
Basically, you need to change the overall default foreground color
and/or background color of your color scheme and then add a rule for
the text
and source
scopes which is used to override the default
colors. For example, if we had a default foreground color which is
meant to be used as the ruler and gutter foreground color:
<key>foreground</key>
<string>#00FFFF77</string>
then we would add
<dict>
<key>name</key>
<string>Text and Source Base Colors</string>
<key>scope</key>
<string>text, source</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#E6E1DC</string>
</dict>
</dict>
in order for us to define our actual default foreground color.
如何在 Sublime 中更改标尺的颜色,我似乎找不到设置此颜色的代码:
在构建 3150 之前,必须使用一种解决方法来设置标尺颜色 - 见下文。 Build 3150 及之后的配色方案支持 rulers
颜色。 (https://github.com/SublimeTextIssues/Core/issues/1830)
CursorRuler plugin has a guide for this in it's Readme.
Ruler Colors
Speaking of ruler visual style, there's apparently no way to set the color of rulers directly. Rulers get their colors from your color scheme's foreground and background settings. The background setting overrides the foreground setting.
Despite the current lack of ability to directly set colors for rulers (as of ST2 build 2219 and ST3 build 3030) there's thankfully a workaround for it described here.
Basically, you need to change the overall default foreground color and/or background color of your color scheme and then add a rule for the
text
andsource
scopes which is used to override the default colors. For example, if we had a default foreground color which is meant to be used as the ruler and gutter foreground color:<key>foreground</key> <string>#00FFFF77</string>
then we would add
<dict> <key>name</key> <string>Text and Source Base Colors</string> <key>scope</key> <string>text, source</string> <key>settings</key> <dict> <key>foreground</key> <string>#E6E1DC</string> </dict> </dict>
in order for us to define our actual default foreground color.