From d2dea390b4644c72716f0495c53dfce72b77121f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 23 May 2019 14:45:40 +1200 Subject: Delete blank lines at top of quoted reply --- vim/after/ftplugin/mail.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vim') diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 39999075..fd2c9705 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -10,10 +10,17 @@ if line('.') == 1 && col('.') == 1 " no quote, which is fine call search('\m^>', 'c') + " Delete quoted blank lines until we get to something with substance + while getline('.') =~# '^>\s*$' + delete + endwhile + " Check this line to see if it's a generic hello or hello-name greeting that " we can just strip out; delete any following lines too, if they're blank if getline('.') =~? '^>\s*\%(\s*$' delete endwhile -- cgit v1.2.3