X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=vim%2Fafter%2Fftplugin%2Fmail.vim;h=3005e25332f509ece6bf16c556c21ad534661f0a;hb=f3480ca467579bf55d7275969576eadeba5d9cec;hp=52ba5052b7645be24233797a0627ac6705b110d4;hpb=060a62dd3b1fc9770d700ca3ae9d26908b4b3488;p=config%2Fdotfiles.git diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim index 52ba505..3005e25 100644 --- a/vim/after/ftplugin/mail.vim +++ b/vim/after/ftplugin/mail.vim @@ -5,4 +5,15 @@ " Use only 65 characters per line as given in rfc1855. -set textwidth=65 +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 }