-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] trim only modified lines #22
Comments
Thanks for your request. While I understand that this feature trims only modified lines, I'm not sure how this benefits users. Specifically, having different styles within a file might not be ideal. Could you explain why this might be useful? If you feel that unnecessary spaces or line breaks are an issue, it would be better to apply formatting to the entire file, even to unmodified sections. |
I wholeheartedly agree with you that applying formatting to the entire file once would be best. However, an organization may decide not to apply standardized formatting, or reject a one-time fix to all of its whitespace code problems, for the sole reason of not "polluting" when a line was last changed. For developers in such a situation that do not want to unintentionally contribute to the already existing whitespace issues, it is nice to be sure that at least the new changes they make do not contain whitespace problems. |
I also agree that formatting the whole file would be best. There was one time that a bug was traced back on me by doing git blame, and I had to explain to my project leader that I only changed whitespace and am not the one who really introduced the bug. So in some situation I prefer trim only modified lines to ensure only what I really code don't contain trailing whitespaces. |
It would be nice to allow trimming only modified lines. Trimming whole file creates some unwanted diff changes in old project files.
vim-better-whitespaces
has an optionstrip_only_modified_lines
for this use case.The text was updated successfully, but these errors were encountered: