diff options
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/squeeze_repeat_blanks.vim | 19 |
1 files changed, 19 insertions, 0 deletions
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 <tom@sanctum.geek.nz> +" 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(<line1>, <line2>) |