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

Mick Heath mick at highplains.com
Thu May 9 10:12:34 MDT 2002


Todd,

I think fmt will do what you want.

fmt -w 80 <oldfile>newfile

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

This tells vi to take the next 345 lines, execute the text following the
!! as a system command, and replace the 345 lines with the output of
that command.

Hope that helps,
Mick

Mick Heath
High Plains Consulting Corp
8000 E. Prentice Ave.  Suite D-10
Greenwood Village, CO  80111
(303) 721-8100  Fax (303) 721-8199
 
"Let them eat cake!" -- Betty Crocker




More information about the clue-tech mailing list