Hi Erik!

On Fr, 21 Nov 2014, Erik Christiansen wrote:

> On 20.11.14 14:09, Will Fiveash wrote:
> > If you are using vim you may want to add vim settings specific to
> > editing mail from within mutt to a file like
> > ~/.vim/ftplugin/mail/mail-settings.vim.  vim will assign by default
> > the filetype "mail" to mutt editor files and look for plugins in
> > ~/.vim/ftplugin/mail.  If you do this then you can just set editor=vim
> > in your .muttrc.  For more see ":help ftplugins" in a running vim
> > session.
> 
> That is a good idea. If it seems simpler to just add a line in .vimrc,
> on the other hand, then an autocommand can also do such jobs, as in this
> one which automates the "[Was: ... ]" editing of a subject line update,
> as above:
> 
> au BufNewFile,BufRead   ~/Desktop/mutt-*   noremap <A-w> 
> ^[gg/Re:^Mce[Was^[A]^[0Wi

I wouldn't use autocommands. Vim does already perfectly recognize mutt 
mails when you have set :filetype plugin on. So simply place all of your 
mutt config into a directory ~/.vim/ftplugin/mail/ 

That is how I do it. For some configuration files look here:
http://www.256bit.org/~chrisbra/cms/vim_as_e-mail_editor.html

> Again, "^[" is "Control-V Escape", and "^M" is Control-V Enter".
> And mutt defaults to composing in /tmp, not ~/Desktop, unless .muttrc
> has something like this, to avoid losing the composition on a wipe of
> /tmp on reboot:

For the sake of readability you should use the normal key notation (:h 
key-notation)

Best,
Christian
-- 
Langsam's Laws:
        (1) Everything depends.
        (2) Nothing is always.
        (3) Everything is sometimes.

Reply via email to