Joining lines into a single line in 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&lt;space&gt; at the end of each line.
If your paragraphs are separated by a blank line, you can do this with a two-part Find and Replace in TextEdit.


Open the Find and Replace dialog (⌥⌘F).
In the Find field, insert the newline character by typing option-return.
In the Replace field, insert a space, then click All. This replaces all newlines with a space, so you'll have one long line of all your text.
Change the Find field to two spaces.
In the Replace field, enter two newline characters (option-return twice).
Click All to move paragraphs to a new line.