sublime中如何将tab变为4个空格?


sublime是一个十分受欢迎的轻量开发编辑器。

请问如何才能将tab变为4个空格?

sublime 经验

月之艮手空 9 years, 10 months ago

在sublime text中将TAB缩进直接转化为4个空格,可以按照如下方式操作:

菜单栏: Preferences -> Settings – More -> Syntax Specific – User

然后添加设置代码就可以了,文件保存在$Packages/User下

{
    "tab_size": 4,
    "translate_tabs_to_spaces": true 
}
新世纪福音扎古 answered 9 years, 10 months ago

你也可以直接设置default preference,如下:

Preference-defalut:

//将Tab键自动替换为4个空格
// 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”: true,
大头宝宝殿下 answered 9 years, 10 months ago

Your Answer