From 0d654e3d9d97f346cfe09fa0f7b3a69fe1c14d48 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 30 Aug 2018 11:14:22 +1200 Subject: First version --- plugin/squeeze_repeat_blanks.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugin/squeeze_repeat_blanks.vim (limited to 'plugin') diff --git a/plugin/squeeze_repeat_blanks.vim b/plugin/squeeze_repeat_blanks.vim new file mode 100644 index 0000000..dcf8b0a --- /dev/null +++ b/plugin/squeeze_repeat_blanks.vim @@ -0,0 +1,19 @@ +" +" squeeze_repeat_blanks.vim: User command to reduce all groups of blank lines +" to the last line in that group, deleting the others. Good for filtering +" plaintext mail that's been extracted from HTML. +" +" Author: Tom Ryder +" License: Same as Vim itself +" +if exists('g:loaded_squeeze_repeat_blanks') || &compatible + finish +endif +if !has('user_commands') || v:version < 700 + finish +endif +let g:loaded_squeeze_repeat_blanks = 1 + +" User command for the above +command! -range=% SqueezeRepeatBlanks + \ call squeeze_repeat_blanks#Squeeze(, ) -- cgit v1.2.3