mac os 下Sublime Text 4 保存时自动转换tab成空格,操作如下:
打开界面如下:
代码如下:
{
"default_encoding": "UTF-8",//编码
"expand_tabs_on_save": true,若要在保存时自动把tab 转换成空格,请把值设置成 true,如不需要: 设置成 false
"font_size": 15,//设置字体大小
"tab_size": 4,//把 tab 转换成4个空格
"show_encoding": true,
"show_full_path": true,
"word_wrap": false,
"trim_trailing_white_space_on_save": true,//此行的主要作用是, 当某行为空格且无其它字符时, 保存时会去除空白
"translate_tabs_to_spaces": true,//把tab 转换成 空格
"draw_white_space": "all",
"ignored_packages":
[
"Vintage",
],
"index_files": true,
}