From: Oleg Broytman Date: Wed, 16 Nov 2022 16:23:45 +0000 (+0300) Subject: .vim: `RemoveTrailingSpaces()` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=45f6f88668a9578f87a6b1520e61070f425053fa;p=dotfiles.git .vim: `RemoveTrailingSpaces()` --- diff --git a/.vim/autoload/text.vim b/.vim/autoload/text.vim index 8fe0e71..87c7369 100644 --- a/.vim/autoload/text.vim +++ b/.vim/autoload/text.vim @@ -1,3 +1,7 @@ +function! text#RemoveTrailingSpaces() + %s/ \+$// +endfunction + function! text#SqueezeEmptyLines() " Replace multiple consecutive empty lines with just one %s/\n\{3,\}/\r\r/