禁用Sublime Text 2中空行末尾的空格删除


8

如果我有以下示例代码:

function foo()
{
    var bar = 1;
    var foo = 1;
    // These two lines will be indented on save,
    // however the following line will have it's indention removed:

    return foo + bar;
}

如何使Sublime Text 2停止删除仅包含空格的行上的缩进?

如果可能的话,我仍然希望将其从包含空格以外的其他字符的行中删除。

Answers:


12

我发现该设置trim_automatic_white_space可以false解决我的问题。

但是启用时它不起作用trim_trailing_white_space_on_save


我将它设置在sublime 2中,而在安装sublime 3时,只是失去了它的选择。v3中也有此选项。
Xavi Montero 2014年

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.