5

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

0

3 Answers 3

8

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

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

3 Comments

These settings removes all guide lines. I ONLY want remove the vertical lines of TAB SPACES like the picture.
@BahadorKhajehmiri does the update help?
Good idea :)) Why didn't I think of that?!
3

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

1 Comment

Like previous answer your solution removes all guide lines. I ONLY want remove the vertical lines of TAB SPACES like the picture.
1

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

Comments