On Thu, Sep 26, 2002 at 09:55:08PM +0300, Mike Jackson wrote:
> Hello,
>  I use mutt for reading messages and vi for composing/replying. I guess
> this is more related to vi, but since somebody here most likely has
> encountered the same problem here goes.
> 
>  If I receive a message from an outlook luser, or similar, and the
> message is completely unwrapped, how do I "fix" that part which I quote?
> I would like to be able to do this automatically.

I usually just do this manually with 'gqq' on each unwrapped line.  But
the idea of doing this automatically intrigued me, so I came up with the
following:

    au BufRead  /tmp/mutt-*  exec 'g/^.\{' . &textwidth . ',}/normal gqq'

It seems to work OK in limited testing.  It has the problem that it
applies the 'gqq' command to lines are are 'textwidth' in length and
longer rather than just to lines that are longer than 'textwidth'.

Note that this solution requires vim and won't work with ordinary vi.

HTH,
Gary

-- 
Gary Johnson                               | Agilent Technologies
[EMAIL PROTECTED]                   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |

Reply via email to