On Wed, Sep 19, 2001 at 11:27:36AM -0700, Collin Peters wrote:
> One more question on this topic. I've set my editor command to the one
> suggested below but would appreciate a little explanation on the
> comments= part. Particularly the 'nb:>' part. Does this mean if I were
> to modify some of the lines below which started with the angle bracket
> (>), it would auto-format those to 72 chars as well AND keep the
> brackets in the correct place? I tried it and it didn't work but some
> of the responses seemed to indicate it would.
Not sure what the 'comments=nb:>' does. But I would imagine your
dificulty is not having compatibility mode tunred off. Add 'nocp' to
your list of sets. (this breaks some strict compatability with vi).
set editor="vim -c 'set tw=72 comments=nb:> nocp'"
Then, 'gqap/gqip' will format the current paragraph when typed in
command mode. A paragraph is a set of lines that have text on them.
(no empty lines in the set).
> > foo
> > bar
will become
> > foo bar
/db
>
> On Wed, Sep 19, 2001 at 09:49:02AM -0400, Justin R. Miller wrote:
> > Thus spake Collin Peters ([EMAIL PROTECTED]):
> >
> > > Another question I have is about using vim for writing e-mails. I
> > > have successfully been able to setup vim to wrap at 80 or so
> > > characters. However, if I edit the message, the word wrapping is not
> > > preserved. For example, if I were to edit my first question above and
> > > add two or three words to it, the line would extend past 80 chars and
> > > not wrap unless I manually edit it. Is there a solution for this?
> >
> > Try this:
> >
> > set editor="vim -c 'set tw=72 comments=nb:>'"
> >
> > Then, once your email is all typed (or during for that matter), just
> > highlight a portion with visual block and hit 'gq'. That should wrap
> > things nicely, without messing up the stuff that you don't want to wrap.
> >
> > --
> > | Justin R. Miller / [EMAIL PROTECTED] / 0xC9C40C31
> > | Of all the things I've lost, I miss my pants the most.
> > ----------------------------------------------------------
>