Vertical rulers in Visual Studio Code

nalply picture nalply · Apr 30, 2015 · Viewed 348.2k times · Source

How can vertical rulers (note the plural) be configured in Visual Studio Code?

In Sublime Text 2 I can do

"rulers": [72, 80, 100, 120]

How does this work in Visual Studio?

"editor.ruler": 80

produces only one vertical ruler.

Answer

Dimitar Asenov picture Dimitar Asenov · Apr 30, 2015

Visual Studio Code 0.10.10 introduced this feature. To configure it, go to menu FilePreferencesSettings and add this to to your user or workspace settings:

"editor.rulers": [80,120]

The color of the rulers can be customized like this:

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