vim

https://github.com/nntrn/save/issues/32

Created on Last updated on


Strip trailing whitespace

:%s/\s\+$//e

Use a keybinding to strip all trailing whitespace

"Remove all trailing whitespace by pressing F5
nnoremap <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>