View Single Post
Old 06-02-2009, 02:24 PM   #15
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,560
Karma: 20150435
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
In vim I'd do something like:

:%s/$/|$
(add a | at every end of line)

:%s/|\n\s\*/\r/g
(replace every | followed by a newline and an arbitrary number of whitespace (at least one) with just a newline)

:%s/|\n/ /g
(replace every | and newline with a space)

Now every paragraph should be a single line (if the source was that simple to begin with).
Jellby is offline   Reply With Quote