I am trying to remove line breaks (is this the same as a hard paragraph return?) from a selection. In bbedit, I go to edit > remove line breaks. I can't find anything like this in Textmate— could someone point out the obvious?
Thanks, Steve
On May 30, 2006, at 11:24 PM, nachodog@mac.com wrote:
I am trying to remove line breaks (is this the same as a hard paragraph return?) from a selection. In bbedit, I go to edit > remove line breaks. I can't find anything like this in Textmate— could someone point out the obvious?
Would a search and replace in selection, regexp enabled, with search string "\n" and replacement string empty not do it? Or maybe you need search string "[\n\r]"?
Thanks, Steve
Haris
On 31/5/2006, at 6:24, nachodog@mac.com wrote:
I am trying to remove line breaks (is this the same as a hard paragraph return?) from a selection. In bbedit, I go to edit > remove line breaks. I can't find anything like this in Textmate— could someone point out the obvious?
Try Text ⇢ Unwrap Paragraph (⌃⌥Q)
This will do a little more than just remove the line breaks, like collapsing successive white space characters between the lines -- but likely this is something you want.
You can set up a command to do this.
sed -e ':a' -e '$!N;s/\n/ /;ta' -e 'P;D'
Save: Nothing Input: Selected Text (or) Document Output: Replace Selected Text
(No, I have no idea what most of the stuff in that command does. I adapted it from a list of sed one-liners I found.)
Cheers, Andrew
On May 30, 2006, at 11:24 PM, nachodog@mac.com wrote:
I am trying to remove line breaks (is this the same as a hard paragraph return?) from a selection. In bbedit, I go to edit > remove line breaks. I can't find anything like this in Textmate— could someone point out the obvious?
Thanks, Steve ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate