gabriel rosenkoetter on Tue, 24 Sep 2002 23:39:10 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] vim question


On Mon, Sep 23, 2002 at 10:27:54PM -0400, eric@lucii.org wrote:
> I use the 'gqip' sequence to reformat paragraphs - currently to 80
> columns.  I'd like it to default to 72 or even 60 in some cases.
> Is there a way to do that in vim? 

Vim's gq commands are cute (and Adam's pointer to the textwidth
setting is probably what you want), but I'd point out that this is
functionality that the editor itself doesn't need on a POSIX system.

I format paragraphs in plain, vanilla vi(1) (okay, fine, so it's
actually nvi, since the real vi source is encumbered, whatever) by
issuing:

!}fmt

You can give fmt(1) an argument for both its goal and maximum lines,
so:

!}fmt 55 60

will shoot for 55 columns, and inhabit no more than 60.

No muss, no fuss, no Vim bloat...

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpY6XRgaMbv6.pgp
Description: PGP signature