Joining lines into a single line in TextEdit

text;textedit

In a text document, how do I join several lines into a single line? I want each paragraph to be on a single line, but keep the lines between the paragraphs.

Here is an example. I want to convert this text

Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
adipiscing vitae, felis.

Curabitur dictum gravida mauris. Nam arcu
libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
vehicula augue eu neque.

to this text

Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
adipiscing vitae, felis.

Curabitur dictum gravida mauris. Nam arcu
libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
vehicula augue eu neque.

I know how to do it in vim or fmt, but can I do it in TextEdit and in the builtin text boxes? I don't want to manually have to do ^D<space> at the end of each line.

Best Answer

Copy the each paragraph of the document. Paste it in the browser address bar. Copy it again from the address bar and paste it in your document. The outcome for each paste should be that part of the document on single line. Will only be practical of course if you have limited number of paragraphs.