67

So I've installed VS Code on my Mac and it works perfectly fine. There's just this white vertical line going down the screen which is kinda annoying.

I'm not sure if it's supposed to be some sort of guide, ruler or something. It just appeared from the start. Is there a way to disable it?

It looks like this :

enter image description here

StormKrow
  • 875
  • 1
  • 6
  • 10

13 Answers13

109

In the settings.json there can be 2 places, where it has "editor.rulers" . Make both empty. To find the settings json refer to this.

enter image description here

aads
  • 2,255
  • 4
  • 24
  • 25
29

By default the ruler shouldn't be visible, but you can check for the following setting:

editor.rulers.

If set, it's an array with column numbers. If you want to turn it off, you can simply set an empty array like this:

"editor.rulers": []

kwood
  • 9,854
  • 2
  • 28
  • 32
  • 4
    So I checked my settings and "editor.rulers": [] is set exactly as you have it already. It must be something else. – StormKrow Aug 04 '17 at 09:21
  • 5
    Workspace settings would be the next place to look. – kwood Aug 05 '17 at 05:25
  • 2
    Another idea: It was enabled by an extension, does it go away if you start the editor from the command line with `code --disable-extensions`? – kwood Aug 05 '17 at 05:26
  • 1
    @StormKrow This should be marked the correct answer. e.g: `"editor.rulers": [80, 100, 120]` if you remove those values i.e `80, 100 and 120` you won't see the lines anymore. – Adedoyin Akande Jan 11 '19 at 07:18
23

In the latest version of vscode you can follow this process to get rid of that white line

Step 1: Go to Preferences -> Settings Screenshot of the preferences panel

Step 2: Search for editor rulers and click on edit in settings.json Screenshot of the search result

Step 3: In many cases, it would be like this:

"editor.rulers": [
  80
]

Remove 80 and make it an empty array and save it.

"editor.rulers": []

By following these steps the vertical line should be removed.

Wouter
  • 534
  • 3
  • 14
  • 22
Gvs Akhil
  • 2,165
  • 2
  • 16
  • 33
22

This was bugging me a lot as well... so I finally tracked down the setting which turned it off.

enter image description here

12

As my dart file was having that issue. So I have added in setting.json:

"[dart]" : {

"editor.rulers": []
}
Tim Stack
  • 3,209
  • 3
  • 18
  • 39
Amit Verma
  • 153
  • 2
  • 6
7

If you search in your settings file - the default settings that is - you will find

// Controls whether the editor should render indent guides

"editor.renderIndentGuides": true,

Set that to false in your user settings - typically the right panel if you open "Settings' from the lower left gear icon.

You can also change the indent guides color if you wish. See Change indent color in theme for VSCode? to learn how to do so. Generally you can find a lot by opening up your Settings and then searching through the default settings.

Mark
  • 143,421
  • 24
  • 428
  • 436
  • 2
    I just tried that and it still doesn't get rid of the white line on the far right. It only removed the indentations lines. I'm not sure if the white line on the right side is some kind of ruler or column guide or something. – StormKrow Aug 02 '17 at 06:36
  • 1
    Sorry, you mentioned guide or ruler so I thought you were referring to the lines on the left. Is your screen split by any chance? Just on a lark does "scrollbar.shadow": "#f00", in the "workbench.colorCustomizations" make it change color? – Mark Aug 02 '17 at 14:35
  • 1
    I just tried that and it didn't get ride of the white line. – StormKrow Aug 04 '17 at 09:20
5

settings.json

{
  "workbench.colorCustomizations": {
    "editorRuler.foreground": "#00000000"//transparent
  }
}

Vertical rulers in Visual Studio Code

ReversalMinutes
  • 101
  • 1
  • 2
3

If u just want to get rid of the rightmost line, edit your settings.json file

"editor.rulers": [],

And if you want to get rid of the left sidelines, just make sure

render indent guides

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
1

steps for solution:

  1. click ctrl+, in vs code editor, or manually open the setting in vscode editor.
  2. search for editor rulers and after a search click on Edit in settings.json enter image description here
  3. make editor rulers empty.
  4. close the tap enter image description here
1

Here are some steps:

  • Open vs code settings.json file

  • then under json file search for this line of code "editor.rulers": enter image description here

  • then remove the or blank the array like this"editor.rulers": [], and save the file.

enter image description here

Neeraj Tangariya
  • 1,159
  • 1
  • 17
  • 29
0

Press Ctrl + Shift + P => Type: setting.json and then click "Open Settings (JSON)

enter image description here

Then change to this: "editor.rulers": [],

-1

in dart language, set this enter image description here

jack
  • 663
  • 1
  • 8
  • 11
  • 1
    https://meta.stackoverflow.com/a/285557/11107541 https://code.visualstudio.com/docs/getstarted/settings#_settingsjson – starball Jun 16 '23 at 01:27
-1
  1. Open the Run command by pressing Windows+R
  2. In the Run command window, type %APPDATA%\Code\User\settings.json and press Enter
  3. This will open the settings.json file in Visual Studio Code.
  4. In the settings.json file, find the following line editor.rulers = []
  5. Remove the 80 in editor.rulers[]
  6. Save the settings.json file. Image of VSCode settings here
Emma
  • 658
  • 10
  • 20