如何修改Sublime中的Tab为四个空格

对于sublime新手来说,特别是学习Python的用户来说,如何能使软件自动将Tab更正为指定数目的空格? 下面将介绍如这个技巧。

   

在Sublime的配置文件中,有对Tab的控制。具体如下:

打开Preferences Setting – Default,可以在发现如下内容:

// 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": false,

   

其中translate_tabs_to_spaces控制着Sublime是否将Tab自动转换为空格。我们只需要将在设置为True即可,但这样,会造成Sublime配置混乱,所以在用户配置文件中进行覆盖

打开Prefrences Setting –User, 添加如下内容从而覆盖软件默念设置。

// 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": ture,

posted @ 2015-11-15 20:48  沙漠里的树  阅读(1263)  评论(0)    收藏  举报