On Mon, May 08, 2000 at 10:13:10PM +0200, Martin Macok wrote:

> Yes, this is usual problem. I solved it with:
> 
> set editor="vim -c \"set textwidth=74\" -c \"set noai\" -c \
>               \"set nocindent\" -c \"set fo=tcrq\""
> 
>  ... and hitting   gq}  and similar in ViM when composing an answer to
> such unbroken long lines.
> 
> Another solutions?

A variation on that would be to put all those vim commands into your
.vimrc instead.

Since mutt creates a file for replies in /tmp and since the name of that
file begins with "mutt-", I have in my .vimrc:

    au BufNewFile,BufRead /tmp/mutt-* set expandtab

so that tabs that I add are always expanded to spaces in my e-mail
replies.  You could do something similar with

    au BufNewFile,BufRead /tmp/mutt-* set tw=74 noai nocin fo=tcrq

I haven't tried multiple settings like that, but from

    :help autocommand-pattern

it looks like it should work.

As for the commands themselves, I don't know why you would need to set
"noai".  I also have in my .vimrc file:

    au BufNewFile,BufRead *.c,*.h set cindent

so that C indenting is set only for C source and header files.  That
would eliminate the need for "nocindent" here as well as when editing
other text files.

-- 
Gary Johnson                 | Agilent Technologies
[EMAIL PROTECTED]         | RF Communications Product Generation Unit
                             | Spokane, Washington, USA

Reply via email to