zed
zed copied to clipboard
Add option "remove_trailing_whitespace_on_save": "only on the lines I modified"
Some people don't care about trailing whitespaces. Some people do care and think there should be none.
There could be a mix of both in a team.
In relaxed hobby projects it is unpleasant to coerce everyone to one of these philosophies.
However, people who care and set up "remove_trailing_whitespace_on_save": true will run into inconveniences, because their commits will touch unrelated lines.
The "remove_trailing_whitespace_on_save": "only on the lines I modified" variant would minimize conflicts in mixed teams.
JetBrains supports this.
Just got hit with "remove_trailing_whitespace_on_save" doing it's silent space removal and having diff tool to ignore whitespace changes.. my mistake, but still a behaviour that's "wrong" from my point of view.
In a large text file with 100s of space separated value with ancient formatting rule to allow "double space" to indicate something without value. Lines i did not edit or touch had their "extra spaces" silently removed. Managed to push those to git (with ignore whitespace hidden ;). Luckily pipeline had checks which managed to catch these so no harm was done.