home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / ftplugin / mail.vim < prev    next >
Encoding:
Text File  |  2003-05-04  |  941 b   |  33 lines

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