[Gllug] formatting a paragraph in vi(m)
tet at accucard.com
tet at accucard.com
Fri Jul 27 08:27:30 UTC 2001
>> 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.
Tet
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list