this post was submitted on 16 May 2025
300 points (98.1% liked)

Programmer Humor

24772 readers
1225 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] silico_biomancer@lemmy.nz 1 points 1 month ago (1 children)

https://github.com/axelf4/vim-strip-trailing-whitespace

There are plugins that will only trim modified lines, which resolves that issue

[–] wise_pancake@lemmy.ca 1 points 1 month ago

That’s a nice idea

Probably a bit more sophisticated than my regex solution.