sublime text保存时删除行尾空格

打开sublime text,点击在Preferences, Settings-User打开的用户配置中加入以下一行:

"trim_trailing_white_space_on_save": true

完整的配置如下

{
    "ignored_packages":
    [
        "Vintage"
    ],
    
    "expand_tabs_on_save": true,

    "trim_trailing_white_space_on_save": true
}

此功能在保存代码时自动应用于当前编辑的文件。

保存前:

 

使用sublime保存后:

此随笔与

Sublime 保存时自动转换tab成空格

是具有关联性的文章,属于代码优化系列sublime使用技巧.

  

转载于:https://www.cnblogs.com/passedbylove/p/4784426.html

你可能感兴趣的:(sublime text保存时删除行尾空格)