user17060738
user17060738

Reputation:

How to remove vertical lines left by tab spaces in VSCode?

When I use tab space in VSCode it remains a vertical line for each tab as in picture below. How can I remove them?

Picture

Upvotes: 5

Views: 8102

Answers (3)

Spark
Spark

Reputation: 29

Faced the same problem, instead of trying to disable the lines, I decided to change the colors to transparent. Heres my settings:

"workbench.colorCustomizations": {
  // BRACKET PAIR
  "editorIndentGuide.activeBackground1": "#ffffff22",
  "editorIndentGuide.background1": "#00000001",
  // LINE NUMBERS
  "editorLineNumber.activeForeground": "#ffffff55",
  "editorLineNumber.foreground": "#ffffff11",
  // GIT LINES
  "editorGutter.addedBackground": "#00000000",
  "editorGutter.deletedBackground": "#00000000",
  "editorGutter.modifiedBackground": "#00000000"
},

enter image description here

I just play with the colors until I catch the one I like

Upvotes: 1

shriakhilc
shriakhilc

Reputation: 3000

The Editor > Guides: Indentation setting controls whether or not those lines are rendered. Just uncheck that box and you should stop seeing them.

vscode settings screen It's the bottom box in this image


Update based on comments: I don't think the editor can selectively render some indent guides while hiding the rest, all 'TAB SPACES' before text count as indentation to it. If you're only doing this with comments for some visual reason, you can simply start the comment early and put the spaces later like so:

Before: before changes

After: after changes

Upvotes: 8

Pratiksha M N
Pratiksha M N

Reputation: 76

VS Code has options to hide/show indent guides. Steps to configure are as below.

  1. Open VS Code Settings [ Cmd + Shift + P / Ctrl + Shift + P ]
  2. Search for 'settings' and select Preferences: Open Workspace Settings
  3. Now in settings, search for 'editor>guides'
  4. Uncheck Editor > Guides: Indentation to remove guides.

VS Code Settings screenshot1

You can also choose to hide or show Editor › Guides: Highlight Active Indentation

Upvotes: 3

Related Questions