]> git.phdru.name Git - dotfiles.git/commitdiff
.vim: `RemoveTrailingSpaces()`
authorOleg Broytman <phd@phdru.name>
Wed, 16 Nov 2022 16:23:45 +0000 (19:23 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 16 Nov 2022 16:23:45 +0000 (19:23 +0300)
.vim/autoload/text.vim

index 8fe0e716c18c69f62f7b083f0da229c46108a562..87c7369246b5e2688d9646e0c2c891cc7c9ef0b2 100644 (file)
@@ -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/