adamdruppe / arsd

This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo.
http://arsd-official.dpldocs.info/arsd.html
531 stars 125 forks source link

trailing whitespace #376

Closed John-Colvin closed 1 year ago

John-Colvin commented 1 year ago

last time I forgot to remove tabs 🤦

for fn in `git ls-files \*.d`; do sed -i -e's/[ \t]\+$//g' $fn; done

adamdruppe commented 1 year ago

oh yeah i think this comes if i start a new line then backspace what i typed and go to another line

cuz then teh auto-indent isn't removed since i edited the line

lol

btw a web search tells me vim doesn't have a convenient remove-on-save setting. you can do a script but then the cursor jumps around when you save in the middle of something. how silly

John-Colvin commented 1 year ago

autocmd BufWritePre * :%s/\s\+$//e ? Might want to be careful about that \s because it might catch windows line endings, I think not but mebbe 🤷‍♂️