Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacLustre

macrumors newbie
Original poster
Feb 3, 2010
4
0
Hi
I want to convert text that I've copy-pasted from email.
Email text is narrowed, and I want the text to fully flow and word-wrap across a page.
I only know a method I used in NoteTabLight.
There, I could find/replace ^p with a space: Replace the line break (then remove any double spaces later).
Neither ^p nor ^P work in TextEdit or Bean.
What is the method people use on this OS, to remove line breaks in this type of situation?
(And, because I'm very poor at guessing keywords and method terms, please be sure to include, "It's called [term]".)

Thanks
 
Get TextWrangler (free), it allows for regular expressions (grep) for the find and replace, which can be used to match new lines. New lines are noted by \r for the search. Though, more simply, it also has an option to unwrap selected text (Text > Remove Line Breaks). Multiple spaces can be removed using a grep find/replace by searching for [\s]+ and replace with a single space. If you have quoted emails that have lines starting with > there's an option to add or remove these under the Text menu.
 
Thanks, angelwatt.

TextWrangler has interesting features.
I think i need to learn how to widen text margins, because after I removed the hard lines, and saw that I needed to call a word-wrap to keep the text inside the window, the soft word-wrap returned the text to the narrow margin.
I'll figure it.

Thanks
 
... Neither ^p nor ^P work in TextEdit or Bean.
...

Just like angelwatt said, Text Wrangler is great. But if you find yourself just wanting to search for carriage returns in a text file, you can select one, copy it, then paste it in the "Find" dialog of either TextEdit or Bean.

And, you could create the string you're searching for in your document window, copy and paste it into the Find dialog. Then go back to the document window to create the replacement string, copy and paste it into the Find dialog and then you're in business.

mt
 
"if you find yourself just wanting to search for carriage returns in a text file, you can select one, copy it, then paste it in the "Find" dialog of either TextEdit or Bean."
-----------
I'm glad I went back and tried that again. This time it worked.

I'm using a split-key keyboard on my Mac, and it's led to confusion a few times. Maybe it's the reason I didn't block-and-copy the line break correctly the first time.

Thanks, everyone, for the help. This solved my problem and got me introduced to TextWrangler.

Cheers
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.