Skip to content
Ron Martinez edited this page Jul 23, 2017 · 2 revisions

You may want to distinguish the cursor rulers from any normal static rulers you may have set. Unfortunately, I'm not aware of a way to set different visual styles for different rulers. However, one option to workaround this is to set multiple rulers around where a single ruler would normally be. For example, if your rulers setting in your user preferences was set like this:

{
  "rulers": [80, 150]
}

then you could do this:

{
  "rulers": [80, 80.25, 150, 150.25]
}

to make your normal rulers "thicker" and therefore distinguishable from the cursor rulers.

Also, you may instead consider making your cursor rulers have a thicker style than your normal rulers.

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.

As a sidenote, gutter text foreground color can be defined directly:

<key>gutterForeground</key>
<string>#0000FF77</string>

as well as the gutter text background color:

<key>gutter</key>
<string>#0000FF33</string>
Clone this wiki locally