Hello, @alan-kilborn,
You said :
For clarity for future readers of this thread, which method is this one?
I was referring to these steps :
First, run a Edit > Blank Operations > TAB to Space option
Then run the regex replacement below, where C represents the maximum number of chars after you want a line-break :
SEARCH [\x20\r\n]*\z|(?-s)^(?=.{C+1,}).{1,C}\K(?:\x20*\R|\x20+)
REPLACE \r\n for Windows files or \n for Unix files
Finally, run a Edit > Blank operations > Trim Trailing Space option
You then said :
And, because I’m currently away from my Notepad++ and can’t try it myself, why are these "must be OFF"s?
I must apologize because I was mistaken ! I did some other tests and it happens that the status of the View > Word wrap does not matter
But I confirm that showing the line-endings chars breaks the correct spliting of text when using the Edit > Line Operations > Split Lines option
STR :
In Settings > Preferences... > Margins/Border/Edge > Vertical Edge Settings insert the value 78 , ONLY
For clarity, just uncheck the View > Word wrap option and the View > Show Symbol option
Paste the beginning of the License.txt file, below, in a new tab :
COPYING -- Describes the terms under which Notepad++ is distributed.
A copy of the GNU GPL is appended to this file.
IMPORTANT NOTEPAD++ LICENSE TERMS
Copyright (C)2021 Don HO <don.h@free.fr>. This program is free software; you may redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; Version 3 with the clarifications and exceptions described below. This guarantees your right to use, modify, and redistribute this software under certain conditions.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
******************************************************************
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
Now, in the new tab, select all this text with Ctrl + A
Run the Edit > Line Operations > Slipt Lines or Ctrl + I option
=> You should get the text below :
COPYING -- Describes the terms under which Notepad++ is distributed.
A copy of the GNU GPL is appended to this file.
IMPORTANT NOTEPAD++ LICENSE TERMS
Copyright (C)2021 Don HO <don.h@free.fr>. This program is free software;
you may redistribute and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation; Version 3 with
the clarifications and exceptions described below. This guarantees your
right to use, modify, and redistribute this software under certain
conditions.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
******************************************************************
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and
other kinds of works.
The licenses for most software and other practical works are designed to
take away your freedom to share and change the works. By contrast, the GNU
General Public License is intended to guarantee your freedom to share and
change all versions of a program--to make sure it remains free software for
all its users. We, the Free Software Foundation, use the GNU General Public
License for most of our software; it applies also to any other work released
this way by its authors. You can apply it to your programs, too.
Now, undo, with Ctrl + Z, the last action in order to return to the unwrapped text again
Click on the ¶ icon or run the View > Show Symbols > Show All Characters option
RE-select all contents of the new tab
Run again the Edit > Line Operations > Slipt Lines or Ctrl + I option
=> This time, you should get this text :
COPYING -- Describes the terms under which Notepad++ is distributed.
A copy of the GNU GPL is appended to this file.
IMPORTANT NOTEPAD++ LICENSE TERMS
Copyright (C)2021 Don HO <don.h@free.fr>. This program is free software;
you may redistribute and/or modify it under the terms of the GNU
General
Public License as published by the Free Software Foundation; Version 3
with
the clarifications and exceptions described below. This guarantees your
right to use, modify, and redistribute this software under certain
conditions.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for
more details.
******************************************************************
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and
other kinds of works.
The licenses for most software and other practical works are designed to
take away your freedom to share and change the works. By contrast, the
GNU
General Public License is intended to guarantee your freedom to share
and
change all versions of a program--to make sure it remains free software
for
all its users. We, the Free Software Foundation, use the GNU General
Public
License for most of our software; it applies also to any other work
released
this way by its authors. You can apply it to your programs, too.
And, obviously, these two texts are quite different !
Test done with a portable N++ v8.9.8 - 64 bits installation !
Best Regards
guy038