Skip to content

Provide a way to stop trim_trailing_whitespace option to modify entire file on save #94

@nbenitez

Description

@nbenitez

When you contribute to open source projects you are required to submit patches or PR with just the code changes for the issue you're trying to fix, but, if the .editorconfig file has trim_trailing_whitespace: true (like here) then even if you just change one line code and save, then the file will have lot of whitespace changes due to the mentioned option.

EditorConfig website docs for trim_trailing_whitespace does not mention that the option should affect ALL the file on save, I think it's less intrusive to just remove the trailing whitespace from the lines of code that you're editing (not to all the file on save).

Well, I understand that this option has been working like that for a while, so in order to not change behaviour for existing users, I propose to add a new preference option like eg. trim_trailing_whitespace_not_on_save: true which will disable the undesirable effect.

Check out this StackOverflow question as an example of how this is currently affecting users:
https://stackoverflow.com/questions/43343211/sublime-text-3-is-automatically-converting-spaces-to-tabs-on-save-regardless-of/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions