163

Is there a simple way of removing linebreaks in Notepad++?

For example:

This text has been splitted
in lines, and it's longer than
3200 words, so it would be great
to find and replace line breaks
like these.
Stevoisiak
  • 16,075
Gabriel
  • 3,020

3 Answers3

241
  1. Highlight the lines you want to join (or use Ctrl + A to select everything)
  2. Choose Edit → Line Operations → Join Lines from the menu or press Ctrl + J.

It will put in spaces automatically if necessary to prevent words from getting stuck together

James P
  • 11,612
65

CTRL+H

In Search Mode pick Extended

Find - \r\n Replace - leave it empty.

Ofiris
  • 1,997
4

For me, using Win 7, I had to use

\r

in the Find box and type in <space> in the Replace box so that there is a single space between the last word of the current line and the first word of the next line.

Alan M
  • 183