[Gllug] formatting a paragraph in vi(m)

Stig Brautaset stig at brautaset.org
Sat Jul 28 10:55:24 UTC 2001


tet at accucard.com writes:

> >> Is it possible in vi(m) to stand in a paragraph with bad formatting
> >
> >gq}
> 
> That works in vim, but if you're stuck in regular vi (as I am on our
> Solaris machines), you'll have to do:
> 
> 	!}fmt
> 
> to format from the current position to the end of the paragraph. If you
> want to format the whole of the current paragraph, you'll need to use:
> 
> 	{!}fmt
> 
> On a related note, I'd advise everyone to go out and grab a copy of
> par -- it's a replacement for fmt, and it does so much more, the most
> useful of which (at least for my daily use) is reformatting while
> preserving line prefixes -- invaluable for mail messages that have
> had Outlook screw up their formatting.
> 
> 	http://www.cs.berkeley.edu/~amc/Par/
> 
> It's included with some Linux distributions (Debian had it last time
> I looked), but it's so useful, it really deserves to be in them all.

I agree. This is a cool program.


Cheers, Stig
-- 
 11:54:34 up 9 days, 17:07,  5 users,  load average: 0.04, 0.36, 0.31

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list