Erm, mutt mode

2000-08-06 Thread Ben H

howdy...

 anyone know of a vim (or vi* clone) mutt mode?

also anyone use any cool .vimrc (or clone) things for mutt editing?

i've looked at the vim links on mutt.org as nice as they are.

cheers

-- 
Ben,   bro_evil(at)subdimension(dot)com
"Doing the wrong thing for the right reasons is better than doing 
   the right thing for the wrong reasons"



Re: Erm, mutt mode

2000-08-06 Thread iain truskett

* Ben H ([EMAIL PROTECTED]) [2806 19:03]:
 howdy...

  anyone know of a vim (or vi* clone) mutt mode?

Well, there's the supplied mode for .muttrc files.

 also anyone use any cool .vimrc (or clone) things for mutt editing?

I have the following in my .vimrc: (note: some bits use vim6 stuff)

" SetUpMail
function! SetUpMail()
set autoindent nosmartindent expandtab list
set textwidth=72 formatoptions=tcqlr comments+=nb:
silent! normal :%s/^ $
normal gg
startinsert!
" autocmd FileType mail so ~/.mail_fold.vim
" clear email body
map ,w :/^$/,$d
0Go
" kill rest of email, except sig
map ,s :,/^-- $/-1d
O
O
" add Return-Receipt-To line
ab rrt mf1G/Reply-To
oReturn-Receipt-To: [EMAIL PROTECTED]`fxa
"  ,,, break current line at current column,
"  inserting ellipsis and "filling space":
nmap ,,,  ,,1,,2
nmap ,,1  a...X...ESCFXrCRlmaky$oCC-R"ESC
nmap ,,2  :s/./ /gC-M3X0"yy$dd`a"yPOCRESCO
" ,kqs = kill quoted sig (to remove those damn sigs for replies)
"  goto end-of-buffer, search-backwards for a quoted sigdashes
"  line, ie "^ -- $", and delete unto end-of-paragraph:
map ,kqs G?^ -- $CRd}
" map ,kqs G?^ *-- $CRdG
" ,kqs = kill quoted sig unto start of own signature:
" map ,kqs G?^ *-- $CRd/^-- $/C-M
endfunction

augroup filetype
  autocmd BufNewFile,BufRead *.txt set filetype=human
  autocmd BufNewFile,BufRead */vim*/doc/*.txt,*/runtime/doc/*.txt   set ft=help
  autocmd BufNewFile,BufRead /tmp/mutt* set filetype=mail
  autocmd BufNewFile,BufRead *News/* set filetype=mail
augroup END
autocmd FileType mail call SetUpMail()


For more of an explanation, check out one of the recent postings to the
vimtips group at egroups:
  http://www.egroups.com/group/vimtips/

You'll want message number 3, "Email".


cheers!
-- 
iain truskett, aka Koschei.   http://eh.org/~koschei/
Join the VIM Tips mailing list:   http://eh.org/~koschei/code/vim/