[CLUE-Tech] RE: vim question: doing a large document using join (Todd A. Gibson)
Collins
erichey2 at attbi.com
Sat May 11 08:41:12 MDT 2002
On Fri, 10 May 2002 23:10:57 -0600 David Anselmi
<anselmi at americanisp.net> wrote:
> 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.
>
Cool, but it needs to be preceded by a rexp to remove leading
whitespace. fmt will not combine this into a single paragraph:
These are some
lines that should be
a paragraph.
--
Collins Richey - Denver Area - WWTLRD?
gentoo(since 01/01/01) 2.4.19+(ext3) xfce-sylpheed-mozilla
More information about the clue-tech
mailing list