On 13.03.18 11:13, Marco Dickert wrote:
> On 2018-03-13 20:50:20, Erik Christiansen wrote:
> > On 13.03.18 10:09, andreas.muel...@biologie.uni-osnabrueck.de wrote:
> > >   can I switch the editor key bindings to the vi style ?
> > There is better than that - you can use vim as the mutt editor, with
> > this line in ~/.muttrc:
> > 
> > set editor=vim
> 
> You also may want to use a mutt-dedicated vim configuration, like I do:
> 
> ----
> set editor="/usr/bin/vim -c ~/.mutt/vimrc"
> ----

Yes, good point. It can alternatively be handled by a vim autocommand,
e.g.:

au BufNewFile,BufRead   ~/Desktop/mutt-*   call Set_for_mutt()

function! Set_for_mutt()             
setlocal textwidth=72 
setlocal formatoptions=qrjt

" Change subthread Subject:                                      
noremap <A-w> ^[gg/^Subject:^MWi [Was: ^OB
"
"Don't quote sig in email replies:
normal :g/^> -- $/,/^$/-1d^M/^$^M^L
endfunction

And for prompting for attachments if they're mentioned in the email,
install CheckAttach.vim & enable it by filetype:

" CheckAttach.vim is a filetype plugin.
filetype plugin on

Note: In ~/.muttrc , there's:

set tmpdir="~/Desktop"  # If not in ~/postponed after a crash, look here.

The autocommand's second field needs to match.

Separate .vimrc files slightly smaller, but raise the problem of
maintaining multiple copies, when common lines are edited. When
there's only one, the problem does not arise.

Erik

Reply via email to