【问题标题】:Default indent line guide in Visual Studio Code?Visual Studio Code 中的默认缩进线指南?
【发布时间】:2016-06-14 22:57:23
【问题描述】:

Visual Studio Code 中有内置的缩进指南吗?

【问题讨论】:

标签: visual-studio-code vscode-settings


【解决方案1】:

我们刚刚在June 2016 release (v1.3.0) 中发布了这个。您可以通过将以下内容添加到您的 settings.json 文件(F1、Open Settings (JSON))来启用它:

"editor.renderIndentGuides": true

对于任何更可定制的缩进指南,您需要一个扩展名,例如 Guides。

【讨论】:

  • @DanielImms 如何使用键盘快捷键来控制它的开关?
  • @BobRockefeller 你需要一个类似这样的扩展,允许你切换设置marketplace.visualstudio.com/…
【解决方案2】:

截至September 2021 (version 1.61) 版本,正确的设置现在是:

"editor.guides.indentation": true

the other answer 的旧设置已被弃用:

缩进引导设置

editor.renderIndentGuides 和 editor.highlightActiveIndentGuide 设置已被弃用,取而代之的是editor.guides.indentation 和editor.guides.highlightActiveIndentation。

【讨论】:

    【解决方案3】:

    默认缩进引导线

    • 方法一(使用 settings.json)

      "editor.renderIndentGuides": false, 现在在 vs 中弃用 代码。

      请改用"editor.guides.indentation": true。

    • 方法 2(使用设置 UI)

      转到设置 > 搜索 editor.guides.indentation > 添加“提示”标记 用于指南缩进。


    自定义缩进线指南

    使用以下扩展,您可以添加自定义缩进指南

    Extension

    【讨论】:

      猜你喜欢
      • 2018-08-21
      • 2022-07-18
      • 2018-03-07
      • 1970-01-01
      • 1970-01-01
      • 2016-03-14
      • 1970-01-01
      • 2016-09-05
      • 2019-04-26
      相关资源
      最近更新 更多