Sublimetext3 升华文本3在保存时自动将空格转换为选项卡,而不考虑设置。我怎样才能阻止这一切?

Sublimetext3 升华文本3在保存时自动将空格转换为选项卡,而不考虑设置。我怎样才能阻止这一切?,sublimetext3,Sublimetext3,我对升华文本3有问题 即使我选择了View>Indentation>Convert tabs to spaces和View>Indentation>Indent using spaces,只要我保存文件,它都会自动转换为制表符 我如何才能阻止这种行为的发生 我当前正在为此使用默认配置设置: // The number of spaces a tab is considered equal to "tab_size": 4, // Set to true to insert spaces whe

我对升华文本3有问题

即使我选择了
View>Indentation>Convert tabs to spaces
View>Indentation>Indent using spaces
,只要我保存文件,它都会自动转换为制表符

我如何才能阻止这种行为的发生

我当前正在为此使用默认配置设置:

// The number of spaces a tab is considered equal to
"tab_size": 4,

// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": false,

// If translate_tabs_to_spaces is true, use_tab_stops will make tab and
// backspace insert/delete up to the next tabstop
"use_tab_stops": true,

// Set to false to disable detection of tabs vs. spaces on load
"detect_indentation": true,

// Calculates indentation automatically when pressing enter
"auto_indent": true,

// Makes auto indent a little smarter, e.g., by indenting the next line
// after an if statement in C. Requires auto_indent to be enabled.
"smart_indent": true,

使用选项卡视图下的缩进选项。 您可以选择选项卡宽度:2

使用选项卡视图下的缩进选项。
您可以选择Tab Width:2

我的解决方案是放弃并切换到VSCode。我对此不高兴。我拒绝了。我诅咒。但最后我不得不让步,因为这样更好。我花更少的时间去摆弄编辑器配置,花更多的时间去编码。

我的解决方案是放弃并切换到VSCode。我对此不高兴。我拒绝了。我诅咒。但最后我不得不让步,因为这样更好。我花更少的时间摆弄编辑器配置,花更多的时间编码。

您有两种解决方案:

  • 保存前执行“查看>缩进>将制表符转换为空格” 档案
  • 要将其替换为普通文本,请按Ctrl+H.>>>>查找所有选项卡>>>替换为4个空格

  • 您有两种解决方案:

  • 保存前执行“查看>缩进>将制表符转换为空格” 档案
  • 要将其替换为普通文本,请按Ctrl+H.>>>>查找所有选项卡>>>替换为4个空格

  • 在右下角,您是否将
    使用空格缩进
    制表符宽度
    选择为4?或者是某个插件导致了这个问题。试着禁用它们。我不知道你说的“右下”是什么意思?我只按照问题中的描述做了。同样的问题,我的
    ~/.editorconfig
    文件指定了
    indent\u style=tab
    ,我安装了
    editorconfig
    插件。谢谢你的想法。我确实安装了EditorConfig(不确定它是干什么的!?),但我的
    ~/.EditorConfig
    文件是空的。在右下角,您是否选择了
    使用空格缩进和
    制表符宽度
    到4?或者是某个插件导致了这个问题。试着禁用它们。我不知道你说的“右下”是什么意思?我只按照问题中的描述做了。同样的问题,我的
    ~/.editorconfig
    文件指定了
    indent\u style=tab
    ,我安装了
    editorconfig
    插件。谢谢你的想法。我确实安装了EditorConfig(不确定它是做什么的!?),但我的
    ~/.EditorConfig
    文件是空的。