Skip to content

Feature request: trim_trailing_whitespace only on modified lines #351

@dserodio

Description

@dserodio

There's an open feature request for trim_trailing_whitespace = modified on the main repo (editorconfig/editorconfig#366). It's very unexpected when unrelated parts of a file are changed behind the scenes when one saves it, and that behavior is much more "Git-friendly". I struggled for a while yesterday with this.

But changing a spec is a long process, and I suspect this change won't ever be accepted because this change in particular "It's imposing too much on implementations to expect them to track changes in the file." as craigbarnes mentions in this comment.

Since the behavior of whether trim_trailing_whitespace should be applied to all lines or only modified lines is not defined by the spec, I propose the VS Code plugin behave like Jetbrain IDEs do

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