From f3480ca467579bf55d7275969576eadeba5d9cec Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 1 Jun 2009 16:21:07 +0200 Subject: [PATCH] after/ftplugin/mail: Try to clean up mails. --- vim/after/ftplugin/mail.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 } -- 2.44.1