From 45f6f88668a9578f87a6b1520e61070f425053fa Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 16 Nov 2022 19:23:45 +0300 Subject: [PATCH] .vim: `RemoveTrailingSpaces()` --- .vim/autoload/text.vim | 4 ++++ 1 file changed, 4 insertions(+) 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/ -- 2.39.5