]> git.phdru.name Git - dotfiles.git/blob - .vim/ftplugin/mail.vim
Initial import
[dotfiles.git] / .vim / ftplugin / mail.vim
1 if exists("b:did_ftplugin")
2    finish
3 endif
4
5 if has("iconv") && !exists('b:encoding_set')
6    " Try to recognize the file encoding and convert the file
7    if search('^Content-Type: text/\(plain\|html\);\n\?\( \|\t\)\+charset=', 'bew') > 0
8       let line = getline(".")
9       let encoding = matchlist(line, 'charset="\?\(\(\w\|-\)\+\)')[1]
10       call SetupEncoding(encoding)
11    endif
12 endif
13
14 setlocal textwidth=72
15
16 " SpamCop reports - goto the 9th line and start a browser
17 nmap <Esc>z 9G3<Bar>,b
18
19 " Remove my signature from a forwarded message
20 nmap \f 2GddG4k5ddkdd
21
22 " Remove boilerplate from a forwarded message from Trac
23 nmap \t 1G21ddG15k11dd:%s/^+//<Enter>:%s/^ \*/--/<Enter>1G