From 44a75be8dde590f8189fc53d1564868b1d03967c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 30 Aug 2018 11:30:06 +1200 Subject: Spin out repeated blank lines map to new plugin --- vim/after/ftplugin/mail.vim | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'vim/after/ftplugin') diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index df0f043d..609cd92f 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -29,6 +29,13 @@ endif setlocal formatoptions+=w let b:undo_ftplugin .= '|setlocal formatoptions<' +" Define what constitutes a 'blank line' for the squeeze_repeat_blanks.vim +" plugin, if loaded, to include leading quotes and spaces +if exists('g:loaded_squeeze_repeat_blanks') + let b:squeeze_repeat_blanks_blank = '^[ >]*$' + let b:undo_ftplugin .= '|unlet b:squeeze_repeat_blanks_blank' +endif + " Stop here if the user doesn't want ftplugin mappings if exists('g:no_plugin_maps') || exists('g:no_mail_maps') finish @@ -83,8 +90,3 @@ let b:undo_ftplugin .= '|nunmap [' \ . '|ounmap ]' \ . '|xunmap [' \ . '|xunmap ]' - -" Quick map to strip multiple blank lines in the entire buffer; this comes up -" a lot when replying to stripped HTML mail -nnoremap x - \ :call mail#ContractMultipleBlankLines() -- cgit v1.2.3