Over time the search function in Columns++ has stretched well beyond its original mission, which was to provide the ability to search in a column selection. While I don’t expect to remove search from Columns++, I felt the extensions to search I developed there would work better for a more general audience if they were separated from the logic and user interface already established in Columns++.
I also wanted to experiment with alternatives to some of the user interface limitations of both native Notepad++ and Columns++ search.
Finally, after saying multiple times that I could not figure out how to incorporate ICU into a plugin, a few weeks ago I searched one more time, and the answer popped right up, in the “AI” section at the top of the Google search results. I don’t know if something has changed, or if I just failed to find it before. (The answer, for C++ programmers, is at https://github.com/unicode-org/icu/releases/ — it’s pretty much just that simple, download the appropriate archive(s), set up the compiler and linker to use the include and binary libraries, include the DLLs in the output directory.) So instead of relying on my home-grown processing of the raw Unicode data files, I can now go straight to ICU.
My experience suggests that early feedback from curious potential users does a lot to avert getting locked into bad design decisions. So, in a first version that will probably provide ample hunting ground for digital entymologists… I present Search++ as a work in progress:
https://github.com/Coises/SearchPlusPlus/releases/
There is a help file.
Features
-
Search++ can be used as a docking dialog or an ordinary dialog. An advantage of the docking dialog is that search results and context will never wind up hidden behind the dialog. As an ordinary dialog, Search++ can be oriented either horizontally or vertically. By default, Search++ opens docked to the right side of Notepad++. You can change that with the first option in the Settings… dialog. (As with any docking window in Notepad++, you can float the docking dialog by dragging its title bar into the main Notepad++ area; however, Search++ as a regular dialog, chosen from the Settings dialog, is likely to be ”better behaved” than a floating dockable dialog.)
-
The Find and Replace fields in Search++ are Scintilla controls. This allows for easy inclusion and visualization of multiple lines, line ending characters and special characters, as well as zooming the fields as desired. Find and replace text is shown using the same font as in the main Notepad++ editing window.
-
Search++ can search within selections (including column selections and multiple selections) and within marked text. Commands are available to Find All (send a list of matches to a search results window), Select, Mark or Show (hide all lines, then unhide lines with matches and mark the matches).
-
Regular expression searches in Search++ perform a fully Unicode-based search using a customized combination of Boost.Regex and ICU4C. In particular, this produces fewer “surprising” results with Unicode characters above 0xFFFF (including most emoji) and when searching in documents using a DBCS code page (which in Notepad++ can be Chinese, Japanese or Korean files that are in the system default encoding instead of in Unicode).
-
Regular expression replacements in Search++ can include numeric calculations. The replacement syntax is similar to the one introduced in Columns++.
Quirks and features with poor discoverability
-
The Find and Replace boxes and the Search++ Results window have right-click menus. There are various commands and shortcuts you won’t discover until you right-click. In particular, history for the Find and Replace windows is on their right-click menus.
-
The main command buttons (Find, Count, etc.) have drop-down menus. You can select an alternate action from those menus. If you Shift+click an item on the menu, that becomes the new action for clicking the button.
-
The Tools button at the top right of the Find box opens a menu of handy functions you might want to use in conjunction with search.
-
If you assign a keyboard shortcut to Search… on the Search++ plugin menu, you can use that to open a search dialog or to switch keyboard focus to it when it is already open. You can use Ctrl+O (think “Other”) to switch between the Find and Replace boxes or to switch from the Search Results list to the Find box. You can use Ctrl+N (think “Notepad++”) to switch keyboard focus back to the current Notepad++ editing window, and Ctrl+Shift+N to close the window you are in (either Search or Search Results) and switch focus back to Notepad++.
-
You can navigate the Search++ Results window by keyboard using the Tab key to move to the next match (or Shift+Tab to move to the previous match). The Enter key will locate in the document window the current cursor position or selection in the Search++ Results window. Shift+Enter will locate and move keyboard focus to the document window. (So you can use Tab to navigate and Enter to see any particular match in context; then when you want to move to that match for editing, use Shift+Enter.)
-
Formulas use the format (?=…) within the replacement box. You can use multiple formulas in one replacement and mix them with other, ordinary replacement strings. Within a formula, use $1 for the first capture group, $2 for the second, etc.; use $ or $0 for the entire match. The match or sub-match is interpreted as a number, and you can use ordinary arithmetic. For example, if the Find string matches a number, (?=$+100) would be replaced by that number plus 100.
-
The Settings… dialog (available from the Search++ plugin menu or the Tools menu) has quite a few options you might want to review.
-
The ICU button at the top is there mostly for testing. It uses the regular expression engine built into ICU, which has different syntax than the familiar Boost.Regex engine and does not integrate as well with Scintilla. Replace is not implemented for this search engine, and it only works on Unicode documents. It will probably be removed when Search++ reaches version 1.0, as it really isn’t very useful except as a check on the results from the main Regex engine (since I’ve meddled with the main Regex engine quite a lot, and I haven’t modified the ICU engine in any way).
Missing and Planned Features, and things I know don’t work quite right yet
-
Search++ does not yet support Find or Replace in all open documents or in files in a directory. I plan to add those capabilities, but I have not determined how I can/will do it.
-
I plan to add a Save function that will let you save searches you might want to use again. Of course, once it is possible to save, it has to be possible to delete and rename and edit and organize… I haven’t designed a user interface for any of that yet.
-
The Search++ Results window doesn’t show matches clearly in dark mode. I might be able to fix that without requiring user intervention; but depending on user experience, I suspect I might need to add the ability to customize colors and perhaps other details of all the Scintilla windows (Find/Replace and Search Results).
-
If you edit a document that has results in the Search++ Results window, the results will no longer be “in sync” with the document and you won’t be able to navigate accurately to matches following the edit point. I don’t know if it is possible to overcome this, but I would like to do so if I find that I can.
-
I’ve implemented a sort of “collision detection” when doing stepwise Find or Replace with the regular (non-docking) dialog or locating matches from the search results, so the document will be scrolled as needed to avoid the found text being obscured by the search window. I know it doesn’t work as well as it could yet. (It’s a surprisingly tricky problem to solve, and I couldn’t find any examples of it being solved already.)
-
I hope to add more features to the regular expression search. The current version is almost identical to the search in Columns++, but presented in what is hopefully a more flexible and user-friendly interface. It should be more accurate for Unicode-derived properties since it uses ICU4C directly instead of working from the home-grown parse of Unicode tables used in Columns++. If I can work out a way, I hope to add Unicode word breaks and more Unicode properties.
Hello,
I wanted to ask if it’s possible to pass a value to Notepad++ that is then immediately searched for and highlighted in the file being opened.
Something like this:
notepad++.exe "%1" -(search) "term"
Is there a command, parameter, or plugin that allows this to be automated?
Thank you in advance for your help!
Greetings –
I’m doing work in matlab where I frequently clean up legacy scripts involving array definitions. Syntax is
myArray = {
a,bbb,c,ddddd;
e,ff,ggg,h;
iiii,jj,k,l
}
In-house convention is to align the comma-separated array-elements into columns with spaces, while retaining the commas, as required by matlab syntax. Array element names can vary in length greatly, and files can get visually messy over time as different users edit and don’t re-align columns.
What I typically do:
(comma separated) --> convert separated values to tabs --> (elastic tabstops) --> convert tabs to spaces
This is wonderfully quick and easy, but it removes the commas. I’ve played around but haven’t discovered – Is there a way to retain the commas?
Hello, All,
Reading that post made me realize that searching for single or duplicate lines is a very common task. Some time ago, for my personal workflow, I had written a method to solve the main cases ! So, in this post, I’m going to show you, from an original file, how to keep :
-
All single lines, ONLY
-
All duplicate lines, ONLY
-
All single lines and the first copy of all duplicate lines
-
All single lines and the last copy of all duplicate lines
-
The first copy of all duplicate lines, ONLY
-
The last copy of all duplicate lines, ONLY
I’ll use a file, named Test_File.txt, that both contains single lines and duplicate lines that appear in 2, 3, 4 or more times. It contains 48 color palettes, found from various sites and added one after another, giving a total of 78,117 records whose 39,532 are single lines and 38,585 are duplicate lines. On the other hand, if we count one copy of all the duplicates, this file contains 11,290 different duplicate lines.
To test my solutions, simply download this UTF-8 file ( 5,937,560 bytes ) from my Google Drive account :
https://drive.google.com/file/d/1aYOpKon4KYw_NXSdj4Tm4Ti_FrygC2ky/view?usp=sharing
Remarks :
Note the definition of single lines : these are lines that differ in characters and/or case from all the other lines of the current file. For example, in this small file of 14 lines, below :
ABC
xyz
123
789
HIJ
HIJ
123
AbC
123
HIJ
abc
HIJ
456
xyz
-
The 5 lines
ABC,AbC,abc,789and456are considered to be single lines, as different in chars and/or case from all the other lines. -
The 3
123lines are considered to be a duplicate line with3copies ( Multiple occurrences ) -
The 2
xyzlines are considered to be a duplicate line with2copies ( Multiple occurrences ) -
Les 4
HIJlines are considered to be a duplicate line with4copies ( Multiple occurrences )
IMPORTANT :
I’ve done some of the work for you, by adding a final column that numbers all lines in this file. Thus, is will be easy to restore the original order of the remaining records, after that each processing is complete. So, in case you need this initial order :
-
Put the caret right before the number
00001, at the end of the first line -
Run the
Edit > Begin/End Select in Column Modeoption ( or use theAlt + Shift + Bshortcut ) -
Move to the last line of the file
-
Put the caret right before the number
78117 -
Run again the
Edit > Begin/End Select in Column Modeoption ( or use theAlt + Shift + Bshortcut )
=> A ZERO-LINE column mode selection should appear throughout all the lines
- Then, run the
Edit > Line Operations > Sort Lines Lexicographically Ascendingoption
=> The original order of the remaining records should be back !
In each procedure, below, 1 or 2 S/R are used. To process them :
-
First, cancel any existing selection to ensure that any line-end character will be taken in account during the S/R phase
-
Open the Replace dialog (
Ctrl + H) -
Uncheck all box options
-
Check the
Wrap aroundoption -
Select the
Regular expressionsearch mode -
Click on the
Replace Allbutton
(1) To keep all the SINGLE lines ONLY ( 39,532 records ) :
-
Paste the
Text_File.txtcontents in a new tab -
Switch to that new tab and select all text (
Ctrl + A) -
Run the
Edit > Line Operations > Sort Lines Lexicographically Ascendingoption -
Click anywhere, in the new tab, to cancel the entire selection
-
SEARCH
(?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )+ -
REPLACE
Leave EMPTY -
Perform the IMPORTANT section, above
(2) To keep all the DUPLICATE lines ONLY ( 38,585 records = 78,117 - 39,532 ) :
-
Paste the
Text_File.txtcontents in a new tab -
Switch to that new tab and select all text (
Ctrl + A) -
Run the
Edit > Line Operations > Sort Lines Lexicographically Ascendingoption -
Click anywhere, in the new tab, to cancel the entire selection
-
SEARCH
(?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )+ (*SKIP) (*F) | ^ .+ \R -
REPLACE
Leave EMPTY -
Perform the IMPORTANT section, above
(3) To keep all the SINGLE lines and the FIRST copy of ALL the DUPLICATE lines, found AFTER the sort ( 50,822 records ) :
-
Paste the
Text_File.txtcontents in a new tab -
Switch to that new tab and select all text (
Ctrl + A) -
Run the
Edit > Line Operations > Sort Lines Lexicographically Ascendingoption -
Click anywhere, in the new tab, to cancel the entire selection
-
SEARCH
(?x-is) ^ ( ( .+ ) .{7} \R ) (?: \2 .{7} \R )+ -
REPLACE
\1 -
Perform the IMPORTANT section, above
(4) To keep all the SINGLE lines and the LAST copy of all the DUPLICATE lines, found AFTER the sort ( 50,822 records ) :
-
Paste the
Text_File.txtcontents in a new tab -
Switch to that new tab and select all text (
Ctrl + A) -
Run the
Edit > Line Operations > Sort Lines Lexicographically Ascendingoption -
Click anywhere, in the new tab, to cancel the entire selection
-
SEARCH
(?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )* ( \1 .{7} \R ) -
REPLACE
\2 -
Perform the IMPORTANT section, above
(5) To keep the FIRST copy of all the DUPLICATE lines ONLY, found AFTER the sort ( 11,290 = 50,822 - 39,532 ) :
-
Paste the
Text_File.txtcontents in a new tab -
Switch to that new tab and select all text (
Ctrl + A) -
Run the
Edit > Line Operations > Sort Lines Lexicographically Ascendingoption -
Click anywhere, in the new tab, to cancel the entire selection
-
SEARCH
(?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )+ (*SKIP) (*F) | ^ .+ \R -
REPLACE
Leave EMPTY
Then :
-
SEARCH
(?x-is) ^ ( ( .+ ) .{7} \R ) (?: \2 .{7} \R )+ -
REPLACE
\1 -
Perform the IMPORTANT section, above
(6) To keep the LAST copy of all the DUPLICATE lines ONLY, found AFTER the sort ( 11,290 = 50,822 - 39,532 ) :
-
Paste the
Text_File.txtcontents in a new tab -
Switch to that new tab and select all text (
Ctrl + A) -
Run the
Edit > Line Operations > Sort Lines Lexicographically Ascendingoption -
Click anywhere, in the new tab, to cancel the entire selection
-
SEARCH
(?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )+ (*SKIP) (*F) | ^ .+ \R -
REPLACE
Leave EMPTY
Then :
-
SEARCH
(?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )* ( \1 .{7} \R ) -
REPLACE
\2 -
Perform the IMPORTANT section, above
At the very end of any of these choices, you may delete the extra numeration :
-
SEARCH
(?x-s) .{7} $ -
REPLACE
Leave EMPTY -
Then run the
Edit > Blank Operations > Trim Trailing Space
Best Regards,
guy038
P.S. :
Note that there is also a native way to get all the single lines and the first copy of all the duplicate lines, found with the present order ( 50,822 records ) :
-
Paste the
Text_File.txtcontents in a new tab -
Switch to that new tab
-
Delete the numeration, at end of each line :
-
SEARCH
(?x-s) .{7} $ -
REPLACE
Leave EMPTY
-
-
Then, use the
Edit > Line Opérations > Remove Duplicate linesoption
Notepad++ release 8.9.3 is available:
https://notepad-plus-plus.org/news/v893-released/
Notepad++ v8.9.3 regression fixes, bug-fixes & new improvements:
- Regression fix: a crash in User Defined Language. (Fix #17520)
- Regression fix: installing (or removing) plugin re-opens Notepad++ with permanent admin privilege (Fix #17540)
- Regression-fix: wrongly added parenthesis for some multi-bytes characters. (Fix #17521, #17802)
- Regression-fix: incorrect function list text display for non-UTF8 documents. (Fix #17847)
- Regression-fix: ProjectPanel Workspace text localization issue. (Fix community report)
- Regression-fix: Change History margin not enabled by default. (Fix comment repport)
- Regression-fix: Notepad++ update & plugin download fail behind corporate MITM proxies. (Fix community report)
- Security enhancement: Update cURL to v8.19.0 in auto-updater (WinGUp) to fix cURL security issue (CVE-2025-14819). (Fix #17869)
- Improve performance by migrating the XML parser from TinyXML to pugixml. (Fix #16175)
- Update Scintilla to 5.6.0 & Lexilla to 5.4.7. (Implement #17562)
- Fix the issue where printing caused Notepad++ to crash. (Fix #6126, #12645, community report #1, community report #2, community report #3)
- Fix Find in Files failing to search file content on disk. (Fix #16177, #17070)
- Add disableNppAutoUpdate.xml to disable auto-update when WinGUp (GUP.exe) is present. (Implement #17836)
- Fix a memory leak on exit. (Fix #17817)
- Fix installed auto-completion files not overwritten after update. (Fix #14749)
- Add model capacity of shortcuts.xml & contexMenu.xml for administration. (Fix #17872)
- Add an option to disable selected text drag-and-drop. (Fix #2571, #11335)
- Fix wrong theme-writing path for non-ProgramFiles installations. (Fix comment repport)
- Enhancement: prevent XML config files from being overwritten when updating portable package (copy/paste). (Fix #9755, #14279, #15120)
- Fix incomplete Find dialg tab translation when 1st opêned from Project Panels. (Fix community report)
- Fix Notepad++ spawning a new Windows Explorer process in Task Manager. (Fix comment repport)
- Add Function List & Autocompletion for D language. (Fix #17349)
Note that I’m away from home and I’ll be able to provide GPG signatures in two days. Sorry for the inconvenience.
Auto-updater will be triggered in 2 weeks, if no critical issue found.
I’m facing a problem similar to the one described in this unanswered thread (link). I had a .txt file in Notepad++ where I stored summaries from a course, and I received the error message: “This file has been modified by another program.” I usually click “No,” but this time I accidentally clicked “Yes” without realizing it. As a result, my file was almost completely wiped, it originally had 2,000 lines and now only has 490. I know this was entirely my fault, but is there any way to recover the original file from somewhere? I tried checking the backup folder but didn’t find anything.
How to compare 2 text files and delete duplicates
would compare + perform this
Thanks
Since Notepad++ 8.6 added DirectWrite as the default rendering method, the program displays Chinese characters in traditional characters, and modifying to GBK font cannot fix the issue; reverting to GDI rendering resolves the problem.

I tracked the issue:
According to Scintilla’s description, DirectWrite determines which set of glyph variants to use for CJK characters based on localeName (locale name).
The default values for Scintilla (see Platform.h) are:
constexpr const char *localeNameDefault = "en-us";
The repair method is as follows:
After enabling DirectWrite, the correct font locale will be automatically set according to the system locale in the init method:
Taking the notepad-plus-plus-8.9.2 source code as an example, modify the if statement starting from ScintillaEditView.cpp:482 to the following:

// === New: Automatically set font locale based on system locale, and fix the issue with CJK font selection ===
wchar_t sysLocaleName[LOCALE_NAME_MAX_LENGTH] = { 0 };
if (GetUserDefaultLocaleName(sysLocaleName, LOCALE_NAME_MAX_LENGTH) > 0)
{
int len = WideCharToMultiByte(CP_UTF8, 0, sysLocaleName, -1, nullptr, 0, nullptr, nullptr);
if (len > 0)
{
std::string localeUtf8(len, '\0');
WideCharToMultiByte(CP_UTF8, 0, sysLocaleName, -1, &localeUtf8[0], len, nullptr, nullptr);
localeUtf8.resize(len - 1);
execute(SCI_SETFONTLOCALE, 0, reinterpret_cast<LPARAM>(localeUtf8.c_str()));
}
}
// === New end ===
After DirectWrite initialization, this code reads the user’s system language (such as zh-CN) and notifies Scintilla to use the corresponding font variant through SCI_SETFONTLOCALE. This ensures that the Simplified Chinese system (zh-CN) correctly selects the Simplified Chinese font, while the Traditional Chinese system (zh-TW) selects the Traditional Chinese font.
Finally result:

When using Windows Notepad, I can open a new .txt file and enter .LOG as the first line. I save this file. Then the next time I open it, the current Date and Time are entered at the bottom of the file, and I can enter new text. Each time I open this file, it goes to the bottom and enters the Date and Time.
Is there a way to do this in Notepad++?
I rarely use the “In selection” checkbox and Notepad++ constantly checks it every time I select even a single character and it’s driving me insane. If I wanted to use it I would manually check it. Is there any way to stop this annoying behavior?