81

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

1
  • indeed, that's so annoying. I hope the guy who had the idea to put this on by default from a sudden will realize most of us hate it! Commented Dec 4, 2023 at 16:39

13 Answers 13

129

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

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

5 Comments

this issue always come with dart
Let's be honest, who actually wants this "feature"?
FYI in Ubuntu, find these settings in ~/.config/Code/User/settings.json
Windows: %appdata%\code\user\settings.json
not working anymore
33

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": []

4 Comments

So I checked my settings and "editor.rulers": [] is set exactly as you have it already. It must be something else.
Workspace settings would be the next place to look.
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?
@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.
25

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.

Comments

22

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

enter image description here

Comments

12

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

"[dart]" : { "editor.rulers": [] } 

Comments

8

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.

3 Comments

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.
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?
I just tried that and it didn't get ride of the white line.
6

settings.json

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

Vertical rulers in Visual Studio Code

1 Comment

The only answer that worked! Thanks
4

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

2 Comments

Indent Guides is exactly what I was looking for!
hit Ctrl + P and search for settings.json
2

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

Comments

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

Comments

0

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

enter image description here

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

Comments

0

It is better to move the line. The default value is 80 Add in settings.json this code:

"editor.rulers": [120], "editor.wordWrapColumn": 120, "editor.wordWrap": "off", "dart.lineLength": 120,

Hope this can work for you

PD: 120 is an example put the number that you want

Comments

-1

in dart language, set this enter image description here

1 Comment

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.