From 6bef31e8a023707fa4e84476706a6d68a32567cd Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 24 May 2019 11:05:40 +1200 Subject: Break up and improve greeting pattern --- vim/after/ftplugin/mail.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vim') diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 48731b93..8a8e82fc 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -17,7 +17,11 @@ if line('.') == 1 && col('.') == 1 " Check this line to see if it's a generic greeting that we can just strip " out; delete any following lines too, if they're blank - if getline('.') =~? '^>\s*\%( *' + \ . '\%(h[eu]llo\+\|hey\+\|hi\+\|sup\|what''s up' + \ . '\|\%(good \)\=\%(morning\|afternoon\|evening\)\)' + \ . '\%( \a\+\)\=' + \ . '[[:punct:]]* *$' delete " Delete quoted blank lines again -- cgit v1.2.3