annotate runtime/ftplugin/mail.vim @ 436:a1c5a6cb2675 v7.0112

updated for version 7.0112
author vimboss
date Thu, 21 Jul 2005 21:11:17 +0000
parents 3fc0f57ecb91
children e63691e7c504
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Mail
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Bram Moolenaar <Bram@vim.org>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2004 Feb 20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Only do this when not done yet for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 if exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 let b:undo_ftplugin = "setl modeline< tw< fo<"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Don't use modelines in e-mail messages, avoid trojan horses
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 setlocal nomodeline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " many people recommend keeping e-mail messages 72 chars wide
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 if &tw == 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 setlocal tw=72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Set 'formatoptions' to break text lines and keep the comment leader ">".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 setlocal fo+=tcql
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Add mappings, unless the user didn't want this.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 if !exists("no_plugin_maps") && !exists("no_mail_maps")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Quote text by inserting "> "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 if !hasmapto('<Plug>MailQuote')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 vmap <buffer> <LocalLeader>q <Plug>MailQuote
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 nmap <buffer> <LocalLeader>q <Plug>MailQuote
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR>:noh<CR>``
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR>:noh<CR>``
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif