Visual Studio Code

您所在的位置:网站首页 vscode制表符 Visual Studio Code

Visual Studio Code

2022-11-14 02:34| 来源: 网络整理| 查看: 265

.vscode/settings.json中有3个选项:

// The number of spaces a tab is equal to. "editor.tabSize": 4, // Insert spaces when pressing Tab. "editor.insertSpaces": true, // When opening a file, `editor.tabSize` and `editor.insertSpaces` will be detected based on the file contents. "editor.detectIndentation": true

editor.detectIndentation 从您的文件中检测到它,您必须禁用它。 如果没有帮助,请检查您是否没有更高优先级的设置。 例如,当您将其保存到用户设置时,它可能会被项目文件夹中的工作区设置覆盖。

更新:

您可以打开文件 » 首选项 » 设置或使用快捷方式:

CTRL+, (Windows、Linux)

⌘+, (Mac)

更新:

现在您可以选择手动编辑这些选项。 点击编辑器右下角的选择器Spaces:4:

如果要将现有的 ws 转换为选项卡,请从 Marketplace 安装扩展程序编辑: 要将现有缩进从空格转换为制表符,请点击 Ctrl+Shift +P 并输入:

>Convert indentation to Tabs

这将根据定义的选项卡设置更改文档的缩进。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3