]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - vim/after/ftplugin/mail.vim
after/ftplugin/mail: Try to clean up mails.
[config/dotfiles.git] / vim / after / ftplugin / mail.vim
1 " Vim filetype plugin file
2 " Language:     Mail
3 " Maintainer:   Simon Ruderich <simon@ruderich.org>
4 " Last Change:  2008-12-07
5
6
7 " Use only 65 characters per line as given in rfc1855.
8 setlocal textwidth=65
9
10 " Replace trailing spaces except after mail headers (To:, etc.) or a signature
11 " delimiter (-- ).
12 silent! %s/\(^\([a-zA-z-]\+:\|--\)\)\@<!\s\+$//
13 " Remove spaces between quotes (> > to >>).
14 silent! %s/^\(>\+\) >/\1>/g
15 silent! %s/^\(>\+\) >/\1>/g
16
17 " Move directly after the headers.
18 normal gg
19 normal }