* Ben H ([EMAIL PROTECTED]) [20000806 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...<ESC>FXr<CR>lmaky$o<CC-R>"<ESC>
        nmap ,,2  :s/./ /g<C-M>3X0"yy$dd`a"yPO<CR><ESC>O
        "     ,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?^> -- $<CR>d}
        " map ,kqs G?^> *-- $<CR>dG
        "     ,kqs = kill quoted sig unto start of own signature:
        " map ,kqs G?^> *-- $<CR>d/^-- $/<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/>

Reply via email to