diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-14 15:38:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-14 15:38:03 +1200 |
commit | e9d2bc6b4e0a912fa1256f38137233dd2056fada (patch) | |
tree | 8e3d3a978de00b222d9bc3418c46c0f69c7282ce /vim/after | |
parent | Add "hey" to generic mail quote greetings (diff) | |
download | dotfiles-e9d2bc6b4e0a912fa1256f38137233dd2056fada.tar.gz dotfiles-e9d2bc6b4e0a912fa1256f38137233dd2056fada.zip |
Delete multiple blank lines after skipped greeting
Diffstat (limited to 'vim/after')
-rw-r--r-- | vim/after/ftplugin/mail.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index ab5454bc..612dc523 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -12,12 +12,12 @@ if line('.') == 1 && col('.') == 1 call search('\m^>', 'c') " Check this line to see if it's a generic hello-name greeting that we can - " just strip out; delete the following line too, if it's blank + " just strip out; delete any following lines too, if they're blank if getline('.') =~? '^>\s*\%(<hello\|hey\+\|hi\)\s\+\S\+\s*$' delete - if getline('.') =~# '^>$' + while getline('.') =~# '^>$' delete - endif + endwhile endif " Now move to the first quoted or unquoted blank line |