97

I would like to have my lines in plain text in Notepad++ wrapped (soft wrapping for display, not insertion of line ends) after a reasonable amount of symbols (like 65 or 80). Is it possible?

The only option I came across is wrapping at window width, which gives ridiculous results provided one uses high resolution, non-gigantic fonts and maximized windows.

endolith
  • 7,704
xxzoid
  • 1,557
  • 2
  • 13
  • 14

6 Answers6

73

According to this source you can somewhat mimic such behavior at least since Notepad++ 5.7

  1. Select “View” from menu bar.
  2. From the dropdown menu that appears click on “Word wrap” option.
  3. either open another editor in other view and move the divider (or alternatively resize editor window) until text wraps at the desired number of characters
Jörg
  • 907
  • 8
  • 7
28

First Install the TextFX plugin from the plugin menu. Note: it available only for 32-bit version of Notepad++.

You can split long lines with this menu command: TextFX -> TextFX Edit -> ReWrap Text to (Clipboard or 72) width which means if you want to rewrap to something other than 72 characters you should type and copy that number (without any spaces) to clipboard and then use this option.

It works in my Notepad++ v6.9 and you have to select the lines you want to split.

Vladislav
  • 389
22

This regex replace worked well enough for me:

Find what:

^(.{60,80})\s

Replace with:

\1\n

Replace All

If some lines couldn't be split to between 60 and 80 characters, those lines will be left unmodified. Hopefully they will be few enough to deal with manually.

Brilliand
  • 332
9

No, it is not possible is current versions of Notepad++. There is a feature request for it, but it has not been implemented yet.

As close as you can get (which isn't very):

  1. Create a vertical line at a specified number of columns Preferences -> Editing -> Vertical Split but N++ will not wrap to it.
  2. A very gimmicky option is to split the display using View -> Clone but obviously does not really solve the issue.
  3. Hard coding is possible with TextFX plugins, or using Ctrl + I shortcuts

For more details you can see the N++ wiki on manging line lengths.

Arjan
  • 31,511
1

Do this:

Config > Edit > Mode Line> Number Coluns

Note: Appers a colun line.

After that do:

Edit > Line operation> Divid lines or simple do CTRL+ I

Before

After

Toto
  • 19,304
1

There is a solution/workaround for this; Sourceforge Notepad++ Forum - Enable/disable word wrap by language? Involving the use of NPPExec and a python script, adjusting a given language's word wrap property. Not ideal but it may work for you.

There is also a feature request on IdeaTorrent for this problem.

wonea
  • 1,877