Page 1 of 1

Join lines (Ctrl-J), sort of

Posted: Fri Dec 07, 2001 4:33 am
by Mike Volberding
I often get text files with line feed characters at the end of each line and a blank line (i.e., a line feed character only) to signify a new paragraph.

I know I can highlight a paragraph and use "Join lines" command (Ctrl-J) to remove the line feeds from within a single paragraph. However, if I mark the entire document (e.g., using Ctrl-A), a Ctrl-J will combine all the paragraphs into one long paragraph. I don't want that.

Is there an easy way to remove the line feeds from *within* all the paragraphs without losing the paragraph themselves? Another way of stating it is to remove all line feed characters if they are immediately preceded and succeeded by a non-line feed character; if you get two (or more I suppose) line feeds in a row, leave them alone.

Thanks for help.

Re: Join lines (Ctrl-J), sort of

Posted: Fri Dec 07, 2001 5:06 am
by Roy Beatty
Try shift-ctrl-J

Re: Join lines (Ctrl-J), sort of

Posted: Sat Dec 08, 2001 12:52 am
by Mike Volberding
A "simple" Shift-Ctrl-J helped but didn't solve the problem. It moved the line feeds to the width of the screen rather than eliminating the line feeds that within the paragraph.

However, when I turned Word Wrap ON, it worked!

Thank you very much!