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.
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
| In .muttrc I have this:
| set editor="vim -c 'set filetype=mail'" # Must wrap mail
I have just this :
because vim autodetects mail messages.
| Has anyone got this combo working right?
| 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).
Misfortune pursues the sinner,
but prosperity is the reward for the righteous.
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org