Josh Smith
Josh Smith

Reputation: 519

How change the color of rulers in Visual Studio Code

Not sure if this feature is included in the VSCode settings yet, but I'd love to change the ruler color from it's default grey.

Tried:

"editor.rulers.color": "color"

But got an "unknown configuration setting error.

Upvotes: 42

Views: 16658

Answers (3)

Alex
Alex

Reputation: 67819

In settings.json:

"workbench.colorCustomizations": {
    "editorRuler.foreground": "#ff333388"
}

Upvotes: 46

lava
lava

Reputation: 7431

  1. File -> Preferences -> Settings Or cntrl+,
  2. type "rulers" and click Edit Setings.json

enter image description here 3. Add the size value by ',' As you wish

enter image description here

 "workbench.colorCustomizations": {
    "editorRuler.foreground": "#0ddf73"
  },

Like this(Gif)

enter image description here

Upvotes: 3

Mark
Mark

Reputation: 182521

From the February 2020 v1.43 release, you can set per-ruler colors. Use like this:

"editor.rulers": [
  {
    "column": 80,
    "color": "#ff00ff"
  },
  100,  // a ruler with the default or editorRuler.foreground color at column 100
  {
    "column": 120,
    "color": "#ff0000"
  },
],

See the release notes here: https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_43.md#multiple-rulers-with-different-colors

Upvotes: 66

Related Questions