From c8f8601079ca6cda5d54716ba3f50d078dd3fcfb Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 12 Nov 2022 18:08:25 +0300 Subject: [PATCH] .vim: `SqueezeEmptyLines()` Replace multiple consecutive empty lines with just one. --- .vim/autoload/text.vim | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .vim/autoload/text.vim diff --git a/.vim/autoload/text.vim b/.vim/autoload/text.vim new file mode 100644 index 0000000..8fe0e71 --- /dev/null +++ b/.vim/autoload/text.vim @@ -0,0 +1,4 @@ +function! text#SqueezeEmptyLines() + " Replace multiple consecutive empty lines with just one + %s/\n\{3,\}/\r\r/ +endfunction -- 2.39.5