[CLUE-Tech] vim question: doing a large document using join
David Anselmi
anselmi at americanisp.net
Tue May 7 21:37:43 MDT 2002
Kevin Cullis wrote:
> Todd,
>
> Yes, it works, but I was wondering if there are other ways or scripts that
> would do a whole file at once. Does it sound like I'll have to use sed to do
> the whole file?
To make all your text flush left, use
:%s/^ *//
That's a better version of what you had - substitute nothing for the spaces at
the beginning of a line, on all lines. Then to format each paragraph:
gggqG
gg takes you to the beginning of the file. gq formats and G takes you to the
end of the file. Note that your textwidth, autoindent, and various other
settings may have an effect - read the help for details.
If that's all too much to type/remember, define a macro to do it.
http://soma.npa.uiuc.edu/docs/vi.macros
Dave
More information about the clue-tech
mailing list