60

Is there any built in Indent Guide in Visual Studio Code?

Gama11
  • 31,714
  • 9
  • 78
  • 100
Cisum Inas
  • 11,552
  • 11
  • 40
  • 55
  • For regular VS 2017: https://stackoverflow.com/questions/42736094/visual-studio-2017-indent-guide-coloring – Andrew Dec 23 '17 at 01:45

3 Answers3

157

We just released this in the June 2016 release (v1.3.0). You can enable it by adding the following to your settings.json file (F1, Open Settings (JSON)):

"editor.renderIndentGuides": true

For anything more customizable indent guides you will need an extension such as Guides.

Daniel Imms
  • 47,944
  • 19
  • 150
  • 166
  • 1
    @DanielImms How can this be controlled with a keyboard shortcut to toggle it off and on? – Bob Rockefeller Apr 13 '17 at 20:20
  • 1
    @BobRockefeller you'll need an extension something like this that allows you to toggle settings https://marketplace.visualstudio.com/items?itemName=hoovercj.vscode-settings-cycler – Daniel Imms May 08 '17 at 14:54
10

As of the September 2021 (version 1.61) release, the correct setting is now:

"editor.guides.indentation": true

editor.guides.indentation setting in UI

The old setting from the other answer has been deprecated:

Indentation guides settings

The editor.renderIndentGuides and editor.highlightActiveIndentGuide settings have been deprecated in favor of editor.guides.indentation and editor.guides.highlightActiveIndentation.

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
3

Default indent line guide

  • Method-1 (using settings.json)

    "editor.renderIndentGuides": false, is now deprecated in vs code.

    Use "editor.guides.indentation": true instead.

  • Method-2 (using settings UI)

    Goto settings > search editor.guides.indentation > Add 'tip' mark for guides indentation.


Custom indent line guide

Using the below extensions, you can add custom indent guides

Extension

dilshan
  • 2,045
  • 20
  • 18