Bjo*_*ine 1 configuration-files visual-studio-code
我正在使用 Visual Studio 代码来编程 cobol。但是,我希望能够为第一个和第二个选项卡设置不同的选项卡大小,然后将大小更改为 3 个空格。但是我不知道如何设置它。这就是我希望它设置的方式。
first tab = 7 spaces.
2nd tab = 1 space.
3th tab = 4 spaces.
4th and ongoing = 3 spaces.
Run Code Online (Sandbox Code Playgroud)
我找到了如何为我的所有选项卡将其设置为 3 个空格。这些是我目前的自我设置。
{
"editor.tabSize": 3,
"editor.detectIndentation": false,
// Insert spaces when pressing Tab. This setting is overriden
// based on the file contents when `editor.detectIndentation` is true.
"editor.insertSpaces": true
}
Run Code Online (Sandbox Code Playgroud)
ran*_*y04 13
您可以使用右下角的工具栏(见下图)手动设置打开文件的缩进,但是无论何时更改选项卡顺序,这都不会持续存在,这是特定于文件的。
从那里开始,VSC 有一个"editor.detectIndentation"默认设置变量,true这将帮助您保持缩进工作。
您甚至可以通过在设置中添加以下内容来设置每种文件类型的默认选项卡大小:
{
"[sass]": {
"editor.tabSize": 2
},
"[html]": {
"editor.tabSize": 4
},
"[javascript]": {
"editor.tabSize": 2
}
}
Run Code Online (Sandbox Code Playgroud)
但是,对于您的请求,恐怕答案是否定的,您不能以仅根据选项卡顺序持续存在的方式执行此操作。
| 归档时间: |
|
| 查看次数: |
5733 次 |
| 最近记录: |