How can I hide indent guides in Visual Studio Code?

前端 未结 5 1954
甜味超标
甜味超标 2021-01-03 21:01

How can I hide the following lines to get a cleaner code view?

Like this in the official documentation:

How can I do that or find settings in t

相关标签:
5条回答
  • 2021-01-03 21:33

    I tried the previous answers, but it would not let me, as it said the file was read-only, so the solution I found was below:

    Click on menu FilePreferencesSettings.

    In the search box, type "render indent guides" (without the "")

    Untick the box which says "Controls whether the editor should render indent guides".

    This removes the indent guides.

    0 讨论(0)
  • 2021-01-03 21:36

    SOLVED: "editor.renderIndentGuides": false

    0 讨论(0)
  • 2021-01-03 21:39

    Go to

    Menu FilePreferencesSettings

    And search for "editor.folding". Set it to

    "editor.folding": false

    This will disable the lines and the folding function.

    Since you want to disable the render indent guides,

    From the documentation

      "editor.renderIndentGuides": false,
    

    This will disable the indent guides.

    0 讨论(0)
  • 2021-01-03 21:49

    Press Ctrl + Shift + p, type settings and select Preferences: Open Settings (JSON) to open User Settings, and add this:

    // Controls whether the editor should render indent guides
      "editor.renderIndentGuides": false,
    

    This will disable the indent guides.

    See the documentation for User Settings.

    0 讨论(0)
  • 2021-01-03 21:55

    Here's a way to hide the indent lines but keep the active line indicator.

    Add this to settings.json.

    "workbench.colorCustomizations": {
      "editorIndentGuide.background": "#00000000" // hide via 100% transparency.
    }
    

    Only the active indent block will be visible.

    To control the color of the active line, add...

    "editorIndentGuide.activeBackground": "#444444b9" // Grey with some transparency.
    
    0 讨论(0)
提交回复
热议问题