From: Simon Ruderich Date: Mon, 1 Jun 2009 14:21:07 +0000 (+0200) Subject: after/ftplugin/mail: Try to clean up mails. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=f3480ca467579bf55d7275969576eadeba5d9cec;p=config%2Fdotfiles.git after/ftplugin/mail: Try to clean up mails. --- diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 5129509..3005e25 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -6,3 +6,14 @@ " Use only 65 characters per line as given in rfc1855. setlocal textwidth=65 + +" Replace trailing spaces except after mail headers (To:, etc.) or a signature +" delimiter (-- ). +silent! %s/\(^\([a-zA-z-]\+:\|--\)\)\@ > to >>). +silent! %s/^\(>\+\) >/\1>/g +silent! %s/^\(>\+\) >/\1>/g + +" Move directly after the headers. +normal gg +normal }