X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=vim%2Fafter%2Fftplugin%2Fmail.vim;h=3005e25332f509ece6bf16c556c21ad534661f0a;hb=9f610fb453be88ea9c03a451054eb3c6d0e62efa;hp=5129509b9a572633c69cb0853e4be0db375816c5;hpb=44bd7f52a0245409d50a98a43dfba618f506f9f8;p=config%2Fdotfiles.git 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 }