在 VS Code 中编写具有特定宽度(可能由 .editorconfig 文件确定)的空格样式的源文件时,如何强制 VS Code 将空格视为制表符而不重新格式化文件?
例如,缩进宽度可能是 4 个空格,因此我宁愿看到一个宽度为 4 个空格的制表符空格字符,而不是在编辑器中显示 4 个空格。
最佳答案
VSCode 1.52(2020 年 11 月)支持空格列表代码的选择方面,并且:
Sticky Tab Stops when indenting with Spaces
If you prefer to indent your code with spaces, there is a new setting called
editor.stickyTabStops
, which makes VS Code treat cursor movements in leading spaces similar to tabs.
关于visual-studio-code - 让空格看起来像 VS Code 中的选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60386177/