42

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.

3 Answers 3

67

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

Sign up to request clarification or add additional context in comments.

4 Comments

is there a way to have different foregrounds starting at different columns? I can do that in Atom
Do you mean the color of the text changing at different columns? Generally no, but you could use the technique at stackoverflow.com/a/64247893/836330
thanks for the tip but no, actually i mean the background color. In Atom i set different background colors for different line lengths (72, 79, 119) snipboard.io/HsaLk4.jpg using an extension called Multi Wrap Guide atom.io/packages/multi-wrap-guide and some simple CSS
@lupodellasleppa I don't think there is any built-in way to do that in vscode, perhaps there is an extension.
46

In settings.json:

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

2 Comments

This worked perfectly for me! If I want to see what other attributes of .view-ruler there are to change, where would I find them? For example, I would like it to be much thicker (I tried setting the width but it didn't change anything).
Aha! I left off ! important, that's what it was. Thanks again!
4
  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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.