Sublime:间距设置为 2 但按 Tab 键仍会插入 4 个空格
Sublime: spacing is set to 2 but hitting Tab key still inserts 4 spaces
我将标签大小设置设置为 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
}
这已经解决了。 You gotta add detect_indentation": false
请参考link:How do I force Sublime Text to indent two spaces per tab?
我将标签大小设置设置为 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
}
这已经解决了。 You gotta add detect_indentation": false
请参考link:How do I force Sublime Text to indent two spaces per tab?