In Notepad++, how do I split long lines in several rows?

I usually use Notepad++ for programming, but recently I started doing some writing in it as well.

Writing usually involves long paragraphs with no line breaks, and currently those are displayed in one row, which is extremely inconvenient.

How can I get N++ to to split lines? I believe that the option is called "split lines" in Gedit.

4 Answers

Go to View -> Word Wrap. Make sure that is checked.

1

If you do want hard breaks in lines of text, you can use this regexp find & replace all:

Find: (?<=.{80})\s
Replace: $0\n

Will look for a space after 80 characters and replace the whole match with itself and a new line (replace with $0\r\n for a Dos\Windows file)

3

Reduce the window size of Notepad++ to your prefered size (move the right window margin). Then select all + Ctrl + I (Edit > Line Operations > Split Lines).

Done.

2

I'm not familiar with notepad++ but I'm positive it's the same method:

Click on Format in the menu bar and enable Wrap option.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like