diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-24 11:05:40 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-24 11:05:40 +1200 |
commit | 6bef31e8a023707fa4e84476706a6d68a32567cd (patch) | |
tree | ce805838d3bc7ac5c1521d19859bd4d4b5cb453b | |
parent | Make greeting regex even nuttier (diff) | |
download | dotfiles-6bef31e8a023707fa4e84476706a6d68a32567cd.tar.gz dotfiles-6bef31e8a023707fa4e84476706a6d68a32567cd.zip |
Break up and improve greeting pattern
-rw-r--r-- | vim/after/ftplugin/mail.vim | 6 |
1 files changed, 5 insertions, 1 deletions
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*\%(<hello\|hey\+\|hi\|\%(good\s\+\)\=\%(morning\|afternoon\|evening\)\)\%(\s\+\S\+\)\=[,;]*\s*$' + if getline('.') =~? '^> *' + \ . '\%(h[eu]llo\+\|hey\+\|hi\+\|sup\|what''s up' + \ . '\|\%(good \)\=\%(morning\|afternoon\|evening\)\)' + \ . '\%( \a\+\)\=' + \ . '[[:punct:]]* *$' delete " Delete quoted blank lines again |