Closed John-Colvin closed 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
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 🤷♂️
last time I forgot to remove tabs 🤦
for fn in `git ls-files \*.d`; do sed -i -e's/[ \t]\+$//g' $fn; done