Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 864
Josh Smith Avatar asked May 09 '17 15:05

Josh Smith


People also ask

Can you change colors in Visual Studio Code?

In VS Code, open the Color Theme picker with File > Preferences > Color Theme. (Code > Preferences > Color Theme on macOS).

How do I change the color of a variable in VS Code?

In Visual Studio Code, use Ctrl + Shift + P and type settings. json to the field that shows up. After you type it, it should give you the settings.

How do I change the color of my VS Code bar?

Press Control + Shift + P when you just open Visual Studio Code and type "open settings(UI)" and search for window. titleBarStyle and change the option from native to custom so that you can restore the colour of status bar from white to black.


2 Answers

In settings.json:

"workbench.colorCustomizations": {     "editorRuler.foreground": "#ff333388" } 
like image 190
Alex Avatar answered Sep 19 '22 09:09

Alex


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

like image 31
Mark Avatar answered Sep 21 '22 09:09

Mark