Re: mutt and vim
On 2004-03-19, Elimar Riesebieter <riesebie@xxxxxxxx> wrote:
> On Fri, 19 Mar 2004 the mental interface of
> Wilkinson, Alex told:
>
> > Hi all,
> >
> > My default editor when using Mutt 1.5.6i is vim.
> >
> > Question: Is it possible to configure vim to be only 80 characters
> > wide *only* when mutt exec's it ?
> >
> In your vimrc:
>
> if has("autocmd")
> au FileType mail set tw=68
> au FileType mail set expandtab
> au FileType mail set tabstop=3 # or whatever you want
> endif
Alternatively, you can get the same results by putting the lines
setlocal tw=68
setlocal expandtab
setlocal tabstop=3 # or whatever you want
in a file named ~/.vim/after/ftplugin/mail.vim which will be sourced
automatically when vim detects that the filetype is 'mail'.
Note that I changed 'set' to 'setlocal' so that those settings will
apply only to the vim buffer containing the mail message.
HTH,
Gary
--
Gary Johnson | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA