[CLUE-Tech] RE: vim question: doing a large document using join (Todd A. Gibson)

David Anselmi anselmi at americanisp.net
Fri May 10 23:10:57 MDT 2002


Mick Heath wrote:

> Todd,
>
> I think fmt will do what you want.
>
> fmt -w 80 <oldfile>newfile

Well, I think Kevin wants one line per paragraph, not lines broken at 80
columns.  I could be wrong.


> Or, if you're within vi you can still use fmt.
>
> Position to the first line of the file
> Determine how many lines are in the file, let's say 345
> Type 345!!fmt -w 80

Seems easier to do this in line mode:

:%!fmt -w 80

will pipe all the lines in the file into fmt and replace them with the
output.

Dave





More information about the clue-tech mailing list