[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mutt and vim just will not play nice for me :-(



On Wed, Apr 03, 2002 at 08:08:39AM +0100, Patrick Kirk wrote:
| Hi all,
| 
| When I post from mutt, my mails are really ugly because I can't get
| it to text wrap.
| 
| In .vimrc I have the setting:
| au FileType mail set tw=70 fo=tcrq2 nomodeline

I have this.  It's the same, with a bit more fanciness.

augroup Mail
    au!
    au FileType mail set tw=70 fo=tcrq2 nomodeline
    au FileType mail set comments+=n:\|
    " clear the old sig and go back to the beginning of the buffer
    au BufRead /tmp/mutt* normal :g/^| -- $/,/^$/-1d
gg
augroup END


| In .muttrc I have this:
| set editor="vim -c 'set filetype=mail'" # Must wrap mail

I have just this :

set editor=vim

because vim autodetects mail messages.

| Has anyone got this combo working right?

Yes.

| Because mutt won't wrap at all.

mutt won't wrap (it isn't editing the message).  vim will.  vim will
wrap the lines under one of two conditions (assuming the line is
longer than 'tw') :
    o   you are simply inserting
    o   you use the 'gq' command to tell it to re-wrap (do this if you
            go back and modify something you've already written)

The gq command takes a motion as an argument.  For example gql will
rewrap the current line only.  gqj will rewrap the current line and
the one below it.  I often use gq2j to rewrap two lines, and repeat
(with .) for the rest of the paragraph.  If you paragraphs are broken
properly, then gq} will rewrap the whole paragraph, but sometimes it
goes beyond the end of the paragraph (if they aren't broken properly).

HTH,
-D

-- 

Misfortune pursues the sinner,
but prosperity is the reward for the righteous.
        Proverbs 13:21


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: