Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
mail.vim51 linesDownload Raw Back to ftplugin
1" Vim filetype plugin file2" Language:	Mail3" Maintainer:	The Vim Project <https://github.com/vim/vim>4" Last Change:	2025 Feb 205" Former Maintainer:	Bram Moolenaar <Bram@vim.org>6 7" Only do this when not done yet for this buffer8if exists("b:did_ftplugin")9  finish10endif11let b:did_ftplugin = 112 13let b:undo_ftplugin = "setl modeline< tw< fo< comments< commentstring<"14 15" Don't use modelines in e-mail messages, avoid trojan horses and nasty16" "jokes" (e.g., setting 'textwidth' to 5).17setlocal nomodeline18 19" many people recommend keeping e-mail messages 72 chars wide20if &tw == 021  setlocal tw=7222endif23 24" Set 'formatoptions' to break text lines and keep the comment leader ">".25setlocal fo+=tcql26 27" Set commentstring to quoting sign ">" so comment shortcuts can be used to28" edit quoted parts of mail29setlocal commentstring=>\ %s30" Add n:> to 'comments, in case it was removed elsewhere31setlocal comments+=n:>32 33" .eml files are universally formatted with DOS line-endings, per RFC5322.34" If the file was not DOS the it will be marked as changed, which is probably35" a good thing.36if expand('%:e') ==? 'eml'37  let b:undo_ftplugin ..= " fileformat=" .. &fileformat38  setlocal fileformat=dos39endif40 41" Add mappings, unless the user doesn't want this.42if !exists("no_plugin_maps") && !exists("no_mail_maps")43  " Quote text by inserting "> "44  if !hasmapto('<Plug>MailQuote')45    vmap <buffer> <LocalLeader>q <Plug>MailQuote46    nmap <buffer> <LocalLeader>q <Plug>MailQuote47  endif48  vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR>:noh<CR>``49  nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR>:noh<CR>``50endif51 
codekingpro/portable-devtools · Team Ai