X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=vim%2Fafter%2Fftplugin%2Fmail.vim;h=8d46f5a6e28d5f2c5689d3da28d1b96402d41c2b;hb=617a06f31f2c223fd5aebd1c32514a2eb3ba30bc;hp=775bba41d4f6c34649c0ae4b5e269900b51fe71b;hpb=9d605338233fe8fe10d71a82c9fd83e9e82d0331;p=config%2Fdotfiles.git diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 775bba4..8d46f5a 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -24,15 +24,19 @@ setlocal textwidth=65 " Remove trailing whitespace after quotes. -silent! %s/\(^>.\{-}\)\@<=\s\+$// +silent! %s/^>.\{-}\zs\s\+$// " Remove spaces between quotes (> > to >>). silent! %s/^>\+\zs >/>/g silent! %s/^>\+\zs >/>/g silent! %s/^>\+\zs >/>/g " Move directly after the headers. -normal gg -normal } +normal! gg +normal! } +" And if the mail contains a reply move the cursor after the quote. +if search('^On .\+ wrote:$', 'n') + normal! } +endif " Fold quotes. Thanks to Teemu Likonen " (http://permalink.gmane.org/gmane.editors.vim.devel/20890,