From: Oleg Broytman Date: Sat, 12 Nov 2022 15:08:25 +0000 (+0300) Subject: .vim: `SqueezeEmptyLines()` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=c8f8601079ca6cda5d54716ba3f50d078dd3fcfb;p=dotfiles.git .vim: `SqueezeEmptyLines()` Replace multiple consecutive empty lines with just one. --- 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