On 11-21 14:44, Gary Johnson wrote: > On Wed, Nov 21, 2001 at 02:58:50PM -0700, Sean LeBlanc wrote: > > I'm not sure this is quite a Mutt question, but someone on here probably has > > a good answer. I have a hook for creating custom signature. In it, I call a > > program which sometimes generates really long lines which I have to wrap > > myself. Is there any way to have vim wrap them? I have textwidth set to 76, > > so that as I type, it wraps. But it does not wrap lines that are already > > there, if you know what I mean. > > To do this within vim, just put the cursor on the too-long line and type > > gqq > > See > > :help gq > > Depending on how fancy you wanted to get, you could probably set up an > autocommand to do this automatically when you opened the file, something > like > > au BufNewFile,BufRead /tmp/mutt-* $normal gqq > > for example, if the line to be reformatted is the last line of your > signature. > > Gary
Thanks. Nicolas suggested using fmt, and that works just fine for the sig. However, your suggestion is good to know. I've been manually fixing lines that got over my limit (and then adjusting via joins and newlines until the next paragraph, etc), and I wish I had known about gqq (and variants) in the past. As Burns would say: Exxxxcellent. :) -- Sean LeBlanc:[EMAIL PROTECTED] Yahoo:seanleblancathome ICQ:138565743 MSN:seanleblancathome AIM:sleblancathome As far as we know, our computer has never had an undetected error. -Weisert Management QOTD:Look, it is time we caucus. I feel we must turn the crank and maintain our commitment to the cost control, etc.