aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-06 09:39:48 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-06 09:39:48 +1200
commit3b529f22fea622e7d4267927a688058d5c7a4500 (patch)
treebcad8562636341c1e65fa419d49d96c525bc74ee
parent43e2766622132d55bb2a63d44129c419ee215e99 (diff)
downloaddotfiles-3b529f22fea622e7d4267927a688058d5c7a4500.tar.gz
dotfiles-3b529f22fea622e7d4267927a688058d5c7a4500.zip
Strip generic greetings from quoted mail
-rw-r--r--vim/after/ftplugin/mail.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 16c228cd..2917425d 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -11,6 +11,15 @@ if line('.') == 1 && col('.') == 1
" no quote, which is fine
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
+ if getline('.') =~? '^>\s*\%(<hello\|hi\)\s\+\S\+\s*$'
+ delete
+ if getline('.') =~# '^>$'
+ delete
+ endif
+ endif
+
" Now move to the first quoted or unquoted blank line
call search('\m^>\=$', 'c')