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.


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

  • 1
    Aha! I was looking for that in Preferences... Thank you, your answer will be accepted in 10 minutes.
    – jcora
    Mar 24 '12 at 17:19

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)

  • 1
    Wow. That is awesome! Jul 14 '16 at 14:47
  • 2
    Ah - remove the \s if you're splitting lines without whitespace. I needed it to split a base-64 string.
    – mwardm
    Mar 6 '17 at 18:13
  • 3
    Since I looked up the regular expression to understand it better, I might as well share what I found: It's a zero-width positive lookbehind assertion that looks for a sequence of 80 characters followed by a space. Since it's not anchored to the beginning of a line, the matching sequence can be the tail of a sequence that contains more than 80 characters.
    – Alan
    Apr 14 '17 at 15:46

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).


  • Welcome to Superuser, I do believe that your post must have proper illustrations to solve the issue. Sep 11 '18 at 11:17
  • This worked great! Thank you, Dirk. Previously, one could hard wrap by selecting Preferences → Editing → Show Vertical Edge, then Split Lines (Ctrl-I), but somewhere along the way they removed this. Now, the trick of changing the window width, then selecting Split Lines (Ctrl-I) works just as well.
    – ViperGeek
    Jul 7 '20 at 17:11

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

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.