<<< Date Index >>>     <<< Thread Index >>>

Re: mutt and vim



* On 2004.03.18, in <20040319052355.GA19240@xxxxxxxxxxxxx>,
*       "Alec Berryman" <alec@xxxxxxxxxxxxx> wrote:
> On Fri, Mar 19, 2004 at 03:28:45PM +1030, Wilkinson, Alex wrote:
> > Question: Is it possible to configure vim to be only 80 characters
> >           wide *only* when mutt exec's it ?
> 
> In your .vimrc, add the line ":autocmd FileType mail :set tw=80".  That
> won't edit the replyed-to or forwarded message, but it will anything you
> type.  To get the replyed/forwared text to be 80, I usually combine it
> into one line and start typing afterwards - it'll even do the "> "
> formatting for you.

You might set up a wrapper for vim that runs stty to set the number of
columns to 80 before vim, and back to the default after. The textwidth
answers you've gotten should work, but I find setting tw in vi/clones
extremely irritating -- I'm much rather just have the editor think it
only had 80 columns to begin with.

Then you'd set editor=my_vim_wrapper in mutt.

-- 
 -D., C.S.M.            "I love broadband. I don't need television anymore."
 ...!uchicago.edu!dgc
 NSIT, University of Chicago