【问题标题】:Sublime: spacing is set to 2 but hitting Tab key still inserts 4 spacesSublime:间距设置为 2,但按 Tab 键仍会插入 4 个空格
【发布时间】:2019-08-04 19:38:38
【问题描述】:

我将标签大小设置为 2:

"tab_size": 2,

这很好用 - 当我打开文件时,它们被格式化为 2 个空格用于缩进。

但是,当我在编码时使用 Tab 键时,我仍然会缩进 4 个空格。

有人知道怎么解决吗?

我的设置文件是:

{
    "default_line_ending": "unix",
    "ensure_newline_at_eof_on_save": true,
    "font_size": 13,
    "ignored_packages":
    [
        "Vintage"
    ],
    "rulers":
    [
        80
    ],
    "show_line_endings": true,
    "tab_size": 2,
    "translate_tabs_to_spaces": true
}

【问题讨论】:

    标签: sublimetext3 sublimetext


    【解决方案1】:

    这已经解决了。 You gotta add detect_indentation": false

    请参考链接:How do I force Sublime Text to indent two spaces per tab?

    【讨论】:

      猜你喜欢
      • 2015-02-12
      • 2018-08-28
      • 2012-03-31
      • 1970-01-01
      • 1970-01-01
      • 2013-10-15
      • 1970-01-01
      • 1970-01-01
      • 2021-10-14
      相关资源
      最近更新 更多