5

Often SublimeText 2 opens files and if it finds in some place some spaces instead of a tab.

I said to force everything to 4 tabs. Not to convert manually every file I open to tabs (like in How to replace four spaces with a tab in Sublime Text 2?)

Sometimes I have a document with tab indentation of 4 spaces and when I press tab it writes 4 spaces!

"detect_indentation": false,
"translate_tabs_to_spaces": false

(doing tab_completion=true it helps)

4

1 回答 1

10

如果您设置detect_indentation为,true那么 ST2 将扫描文件用于缩进的内容,并且(制表符或空格)将是您按下Tab键时插入的内容。如果您查看 ST2 窗口的底部,在右侧显示当前文档的语言的左侧,它应该显示类似Tab Size: 4Spaces: 4。您可以单击它以(取消)设置Indent Using Spaces选项,以及设置制表符的呈现大小。

于 2013-03-12T01:38:40.533 回答