On Mon, Aug 21, 2006 at 10:08:50PM EDT, Pete Johns wrote: > On Mon, 2006-08-21 at 20:54:21 -0500, Tom Purl sent: > >I'm looking for a simple function that will reformat a selected > >block of text for e-mail messages (80 columns long, preserving > >">" characters, etc). Vim Cream can do this very well, but the > >functionality doesn't easily translate to vanilla Vim from what > >I can see, and I prefer using Vim instead of Cream. > > > >Is there a function that allows me to do this for Vim? > > > Have you tried 'gq'? This works perfectly for me with visual > blocks.
Someone on the list recently suggested I use "gqip" to reflow paragraphs and I was going to suggest that. Much to my delight, I later found that it also preserved the ">" characters in e-mail messages, so I was going to recommend using that. I find it quicker than entering visual mode. This thread made me realize that I do not even understand how gqip "works"..? :h gq tells me that the general format is gq{motion} .. but what kind of motion is "ip"..? "i" should move the cursor up just one line but what about "p"..? Thanks cga