• Please Read This Before Posting

    Pinned Locked
    1
    7 Votes
    1 Posts
    6k Views
    No one has replied
  • v8.7 Search Results Missing

    Pinned
    15
    0 Votes
    15 Posts
    3k Views
    xomxX

    This v8.6.9-v8.7.2 issue has been fixed (GitHub commit).
    The fix will be included in the next Notepad++ version (probably v8.7.3).

    @PeterJones
    I would leave this topic pinned for a while longer until the fix reaches most N++ users.

  • HELP: Having trouble with Macros in v8.5.3 or later

    Pinned
    28
    2 Votes
    28 Posts
    13k Views
    Mike NewmanM

    Moderator Note: The contents of this post were moved to a separate topic, Macro works normally, but fails when shortcut is Ctrl+Shift+C, because it’s actually separate from the >=v8.5.3 issue for this Topic.

  • Notepad ++ Plugin Geneator

    2
    0 Votes
    2 Posts
    35 Views
    PeterJonesP

    @ISSUE-BADGE ,

    The user manual has a section on how to create a plugin. I recommend starting there

    https://npp-user-manual.org/docs/plugins/#how-to-develop-a-plugin

    In general, for storing information / configuration, plugins should grab NPPM_GETPLUGINSCONFIGDIR, create a subdirectory named the same as their plugin, and put any saved configuration values in one or more files in that directory.

  • Regexp multiline text replace when care about line delimiters

    3
    0 Votes
    3 Posts
    76 Views
    guy038G

    Hello, @i-hay, @coises and All,

    I found out an easy solution to your problem ! To that purpose, I used the the Edit > Line Operations > Reverse Line Order menu option, which is quite powerful when multi-lines regex is involved !

    So, let’s consider your INPUT text :

    No Name Relationship Date of Birth Date of Death Age Other information 1 Fred BLOGGS May 13 1800 93 yrs Brotherton Liz wife Apr 39 1840 64 yrs Ann DIRGEWALL (husband : Jay) Jny 2 1955 61 yrs Gable St 2 Unmarked grave 3 Unmarked grave 4 Jack GARDNER Dec 5 1967 75 yrs Grove Rd Jane wife Sep 2 1969 70 yrs Blackpool Mary JONES wife of Adam Jly 4 1930 5 Henry ALBERT Jny 4 1900 68 yrs Abbeyrange Lola wife Dec 28 1909 76 yrs Jack HARBOR son in law Jan 29 1976 49 yrs Julie wife May 29 1999 72 yrs

    First, select all the text, which needs re-numbering

    Use the Edit > Line Operations > Reverse Line Order menu option

    => You should get this temporary OUTPUT text :

    Julie wife May 29 1999 72 yrs Jack HARBOR son in law Jan 29 1976 49 yrs Lola wife Dec 28 1909 76 yrs 5 Henry ALBERT Jny 4 1900 68 yrs Abbeyrange Mary JONES wife of Adam Jly 4 1930 Jane wife Sep 2 1969 70 yrs Blackpool 4 Jack GARDNER Dec 5 1967 75 yrs Grove Rd 3 Unmarked grave 2 Unmarked grave Ann DIRGEWALL (husband : Jay) Jny 2 1955 61 yrs Gable St Liz wife Apr 39 1840 64 yrs 1 Fred BLOGGS May 13 1800 93 yrs Brotherton No Name Relationship Date of Birth Date of Death Age Other information

    Now, move back at the beginning of the reversed text

    Open the Replace dialog ( Ctrl + H )

    Uncheck all the box options

    FIND (?s)^\x20(?=(?:.+?)^(\d+))

    REPLACE \1

    Select the Regular expression search mode

    Click, once only, on the Replace All button

    => Your temporary text is then changed into : :

    5 Julie wife May 29 1999 72 yrs 5 Jack HARBOR son in law Jan 29 1976 49 yrs 5 Lola wife Dec 28 1909 76 yrs 5 Henry ALBERT Jny 4 1900 68 yrs Abbeyrange 4 Mary JONES wife of Adam Jly 4 1930 4 Jane wife Sep 2 1969 70 yrs Blackpool 4 Jack GARDNER Dec 5 1967 75 yrs Grove Rd 3 Unmarked grave 2 Unmarked grave 1 Ann DIRGEWALL (husband : Jay) Jny 2 1955 61 yrs Gable St 1 Liz wife Apr 39 1840 64 yrs 1 Fred BLOGGS May 13 1800 93 yrs Brotherton No Name Relationship Date of Birth Date of Death Age Other information Finally, redo a Edit > Line Operations > Reverse Line Order menu option

    Here we are ! We get your expected OUTPUT text, below :

    No Name Relationship Date of Birth Date of Death Age Other information 1 Fred BLOGGS May 13 1800 93 yrs Brotherton 1 Liz wife Apr 39 1840 64 yrs 1 Ann DIRGEWALL (husband : Jay) Jny 2 1955 61 yrs Gable St 2 Unmarked grave 3 Unmarked grave 4 Jack GARDNER Dec 5 1967 75 yrs Grove Rd 4 Jane wife Sep 2 1969 70 yrs Blackpool 4 Mary JONES wife of Adam Jly 4 1930 5 Henry ALBERT Jny 4 1900 68 yrs Abbeyrange 5 Lola wife Dec 28 1909 76 yrs 5 Jack HARBOR son in law Jan 29 1976 49 yrs 5 Julie wife May 29 1999 72 yrs

    Some details about the search regex :

    First, the (?s) syntax is an in-line modifier which has the same effect that checking the . matches newline option of the Replace dialog

    Then, the regex just looks for a space character \x20, at beginning of a line ( ^ ), ONLY IF it is followed with a look-ahead syntax ((?=..........) ), coming next

    This structure looks, itself, for any character, even new-line char(s), in a non-capturing group ( (?:....) ) , till the nearest line ( .+? ), beginning by a number ( ^\d+ ), that is stored as group 1, due to the embedded parentheses ( (\d+) )

    In replacement, any space character ( \x20 ) is then replaced with the contents of the group 1, which is our desired number !

    Best Regards,

    guy038

  • I've had to get rid of Notepad++ and I sad Help with BUG

    3
    0 Votes
    3 Posts
    53 Views
    CoisesC

    @BrenMar

    Please try downloading a portable version:

    https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.8.3/npp.8.8.3.portable.x64.zip

    Unzip that to a folder. Then open the folder and double-click the notepad++.exe file. That should open Notepad++. Try opening a file from File | Open. Then try opening a .txt file in regular Notepad and be sure that works.

    If all that works, then we know what’s going wrong has something to do with the installer (edit to add: or corrupted user settings), not the program proper. That doesn’t (yet) solve your problem, but it will help figure out where to look next.

    If you can’t run the portable version, or you can run the portable version but you can’t open a file, then that’s a different kind of problem.

    Please report back and be as detailed as you can about what you did and what happened.

  • Installation Bug?

    3
    1 Votes
    3 Posts
    82 Views
    mpheathM

    @Rory-O-Brien

    There is a checkbox to check to stop the log page from automatically closing. If the log closed then the extraction of files would be basically finished. I can only suggest checking system event logs and program logs that may scan and block processes. More details may help to expose the source of the issue.

    The v8.8.3 installer may work like previous versions though the uninstaller appears to be bugged regarding the unregistering of the context menu extension as I found today viewing the log.

    Process $winSysDir Target install x64 $WINDIR\System32 Redirects to C:\Windows\SysWOW64 install x86 $WINDIR\SysWOW64 C:\Windows\SysWOW64 uninstall No value assigned \regsvr32.exe uninstall No value assigned \rundll32.exe

    The install system path both target the 32 bit system directory so the creation of a variable named $winSysDir seems pointless when the builtin $SYSDIR would be adequate. $SYSDIR also works for the uninstall process so instead of targeting the root of the current drive as to the empty value of $winSysDir, it will target the 32 bit system directory.

    whindsaks questioned the use of $winSysDir a few weeks ago in a commit comment . Nobody responded at that time.

    For a 32 bit process, like the installer is, to access the 64 bit system directory, the file system redirector may need to be temporarily disabled while the access is needed. The alias $WINDIR\SysNative can also access the 64 bit system directory with Windows Vista+ from a 32 bit process. $winSysDir fails to achieve this 64-bit access as the active file system redirector changes the direction and I do not see how previous installers accessed it either without absolute paths so it has been accessing the 32 bit system directory for a long time.

    @xomx can you confirm and consider a solution.

  • Drag-and-drop not working in editor

    3
    0 Votes
    3 Posts
    53 Views
    CoisesC

    @DanielTheGreatAu said in Drag-and-drop not working in editor:

    a hidden setting somewhere that reverts Notepad++ to ‘normal’ Windows behaviour

    Settings | Preferences… | Editing 2 | Multi-Editing: uncheck Enable Multi-Editing to restore normal Ctrl+drag behavior.

    Shift key down, then drag on a selection, as far as I know, has never moved the selection in Notepad++ — it just changes the selection. You don’t need the Shift key to move a selection.

  • UDL highlight words between 2 keyword

    2
    0 Votes
    2 Posts
    52 Views
    PeterJonesP

    @taigama_coder said in UDL highlight words between 2 keyword:

    How can I use UDL to fromat it?

    That is beyond the capability of UDL: it’s designed for simple keyword and operator highlighting, and what you are asking would require a custom lexer…

    Normally, I would suggest the EnhanceAnyLexer plugin, which allows adding foreground coloring based on regular expressions… but since you are asking to highlight the whitespace, and whitespace by definition is not using the foreground color, I don’t think it’s features would help you.

  • easy way to move a file tab in the open file list

    2
    0 Votes
    2 Posts
    39 Views
    mathlete2M

    @Arne-Everhard it sounds like you’re referring to the functionality of the Move Tab Forward and Move Tab Backward options in the View > Tab menu. If so, both have default shortcuts, but they can be modified in the Main Menu tab of the shortcut mapper.

    Note: I actually had a difficult time finding those particular options in my own window at first; you may need to filter by “tab” to see these particular options right away.

  • Toolbar icons with 2560x1440 display

    9
    0 Votes
    9 Posts
    2k Views
    PeterJonesP

    After this conversation, I worked briefly on a workaround. I took the 16x16 standard-icon BMP files from the N++ source code, converted them to ICO format, then on all the files, I used an image program to upscale from 16x16 to 32x32, and make .ico files that have both 16x16 and 32x32 resolution files. The 32x32 are admittedly ugly (because they are just enlarged versions of the 16x16), but it’s at least a starting place, and will give the ability to have icons that are based on the standard icon set, but being able to use them in large-icon mode.

    Assuming a standard installation of Notepad++ (using %AppData% config directory), to use these dual-resolution ICO files:

    Go to %AppData%\Notepad++\ in Windows Explorer Create a directory toolbarIcons and a subdirectory toolbarIcons\StandardDualResolution Download the .ico files in https://github.com/pryrt/nppStuff/tree/main/StandardIconUpscaling/GIMP DualResolution 32x32 16x16 and unzip into toolbarIcons\StandardDualResolution\ update: added zipfile for easy download Rename toolbarButtonsConf_example.xml to toolbarButtonsConf.xml Edit that file, and near the end, change the line from <ToolBarIcons icoFolderName="" /> to <ToolBarIcons icoFolderName="StandardDualResolution" /> Save the toolbarButtonsConf.xml exit Notepad++

    The next time you run Notepad++, it should be using the custom versions of the standard icons. If you select Settings > Preferences > Toolbar and choose one of the “large” choices, it should use the custom icons in large (32x32).

    5ef248da-6716-4e80-a474-4147eb20d515-image.png

    This is obviously not ideal. But since there hasn’t been any official or publically-available 32x32 “originals” of those icons in 14+ years, that I can find, it’s the best thing I can think of for now. Someone with more image editing skill – or more AI skill – might be able to generate better 32x32 versions from the original 16x16 BMP files in the source code and create better-looking versions as ICO files. But until such happens, this might be a usable workaround.

  • Notetab++ novice questions

    3
    0 Votes
    3 Posts
    282 Views
    PeterJonesP

    A few months ago, I said,

    I don’t know of anyone who has done that and made them public.

    After this conversation, I worked briefly on a workaround. I took the 16x16 standard-icon BMP files from the N++ source code, converted them to ICO format, then on all the files, I used an image program to upscale from 16x16 to 32x32, and make .ico files that have both 16x16 and 32x32 resolution files. The 32x32 are admittedly ugly (because they are just enlarged versions of the 16x16), but it’s at least a starting place, and will give the ability to have icons that are based on the standard icon set, but being able to use them in large-icon mode.

    Assuming a standard installation of Notepad++ (using %AppData% config directory), to use these dual-resolution ICO files:

    Go to %AppData%\Notepad++\ in Windows Explorer Create a directory toolbarIcons and a subdirectory toolbarIcons\StandardDualResolution Download the .ico files in https://github.com/pryrt/nppStuff/tree/main/StandardIconUpscaling/GIMP DualResolution 32x32 16x16 and unzip into toolbarIcons\StandardDualResolution\ update: added zipfile for easy download Rename toolbarButtonsConf_example.xml to toolbarButtonsConf.xml Edit that file, and near the end, change the line from <ToolBarIcons icoFolderName="" /> to <ToolBarIcons icoFolderName="StandardDualResolution" /> Save the toolbarButtonsConf.xml exit Notepad++

    The next time you run Notepad++, it should be using the custom versions of the standard icons. If you select Settings > Preferences > Toolbar and choose one of the “large” choices, it should use the custom icons in large (32x32).

    5ef248da-6716-4e80-a474-4147eb20d515-image.png

    This is obviously not ideal. But since there hasn’t been any official or publically-available 32x32 “originals” of those icons in 14+ years, that I can find, it’s the best thing I can think of for now. Someone with more image editing skill – or more AI skill – might be able to generate better 32x32 versions from the original 16x16 BMP files in the source code and create better-looking versions as ICO files. But until such happens, this might be a usable workaround.

  • 0 Votes
    2 Posts
    60 Views
    Mark OlsonM

    @PATRICK-MULOT

    This is probably a job for regular expressions, but it depends to some extent on the specifics of your task.

    If you have a text file where every line is a word that you need to search for, you need to do a scripting solution. This kind of question has been asked many times before on the forum and I’m too lazy to look up which posts it was answered in, but a PythonScript script that would accomplish this would probably be as follows:

    Open the file with the words you’re searching for (hereafter WORD_FILE) Open the PythonScript console Paste in the command words = [x + ' ' for x in editor.getText().splitlines()] then hit Enter. Open the file that you want to search in (hereafter TARGET_FILE) Paste in the command lines = [line for line in editor.getText().splitlines() if any(line.startswith(word) for word in words)] then hit Enter Open a new file. Paste in the command editor.setText('\r\n'.join(lines)) and hit Enter Your new file will contain only the lines in TARGET_FILE that started with one of the words in WORD_FILE followed by a literal space character

    If you want to find lines that start with "fam " or "blah " (as in “fam” or “blah” followed by a literal space character), you can do that by:

    Use Search->Find... from the Notepad++ main menu (Ctrl+F with default keybindings) to open the Find form. Set Search Mode to Regular expression. Set Find what: to (?-i)^(?:fam|blah)\x20.* This regular expression has these basic parts: (?-i), ^, (?:fam|blah), \x20, and .* The (?-i) says that this is a case-sensitive search (so it would exclude lines starting with FAM for example) The ^ means that we only search at the start of a line The (?:fam|blah) matches fam or blah The \x20 is a different representation of a normal space character, which I sometimes use in regular expressions to make it more readable The .* matches the rest of the line (. is any non-newline character and * means match 0 or more of the preceding pattern) Hit the Find All in Current Document button. A form will pop up at the bottom of the Notepad++ window showing all the lines that matched.
  • 0 Votes
    5 Posts
    126 Views
    Robert Or Janet DiebelR

    @guy038 Thanx much for your help

  • Search/Find Dialog

    5
    0 Votes
    5 Posts
    197 Views
    Gerhard MunroG

    @guy038 @PeterJones

    I have checked the Registry Entries as requested:

    If your system doesn’t have MS Shell Dlg (or 2) installed, or even if it does, you might also want to look in your registry at HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes and see if MS Shell Dlg (or … 2) has an entry (for mine, those two have entries set to MS Sans Serif and Tahoma, respectively). If there is a FontSubstitutes entry set up on your computer, then you need to check that the resulting font exists in your c:\windows\fonts\ or equivalent directory. If not, then I have no idea what font that Windows OS will choose for that text.

    Regex.png

    Then checked the fonts:

    Screenshot 2025-07-27 165307.png

    I highlighted the 2 fonts, MS Sans Serif is named MS Sans Serif Regular but I think this is ok.

    I then checked my wife’s laptop, HP Firefly with Win 11 24H2 and Notepad++ is perfect. I gather it must be a graphics setting on my machine as I am having endless driver issues. I also read up a lot on this topic and it seems like it has something to do with scaling (not 100% sure here).

    Anyway, I apologize for this thread as I think this is an isolated incident on this specific laptop.

    The resolution is 3840 x 2400
    Scale : 250% (Recommended)

  • How to remove empty strings by notepad++?

    4
    0 Votes
    4 Posts
    106 Views
    mathlete2M

    @Раке if you still prefer using a Regex-based Search and Replace, you can add a Start of Line anchor (and perhaps the whitespace character class with a quantifier) to get similar results. For example, a search of ^\s*\r\n will remove all “empty” lines, including ones with various types of whitespace.

    Sample start text:

    c8db255e-b5b8-4d9d-b85c-db4da28525d5-image.png

    After running the S/R with the above Regex:

    a6fef303-5305-4289-9f25-8f4ebfd36ff9-image.png

  • [regex] Why unexpected hit?

    3
    0 Votes
    3 Posts
    109 Views
    S

    @PeterJones Thank you.

  • How to replace any text between some text without specifics

    3
    0 Votes
    3 Posts
    85 Views
    th3lifeoftorchT

    @PeterJones Very much appreciate this, you saved me a lot of time

  • 0 Votes
    5 Posts
    69 Views
    Paul LeoP

    @Paul-Leo Thanks, and sorry about missing the FAQ re: npp crashes after update/upgrade!

  • Macros to find foward the next character

    7
    0 Votes
    7 Posts
    143 Views
    PeterJonesP

    @Ivan-Garnizov said in Macros to find foward the next character:

    the question refers to your source of information,
    Where do you find and most importantly interpret these codes?

    My source of information is the User Manual and the Notepad++ source code, both of which are publically available.

    User Manual: Generic info on macros = https://npp-user-manual.org/docs/macros/ User Manual: Details on the macro syntax in the shortcuts.xml file = https://npp-user-manual.org/docs/config-files/#macros Source Code: Values for the message="###" on the type="0" and type="1" commands = https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/include/Scintilla.h Each of those command names (with their numbers) listed in Scintila.h is documented by the Scintilla project = https://scintilla.org/ScintillaDoc.html Source Code: Values for the wParam="###" on the type="2" commands = https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/menuCmdID.h The menuCmdID.h was not intended primarily for human-readability, so here is an example cheat sheet for how to read it: If we wanted to look up the Search > Select and Find Next, and already knew it was IDM_SEARCH_SETANDFINDNEXT:#define IDM_SEARCH_SETANDFINDNEXT (IDM_SEARCH + 48) That says that IDM_SEARCH_SETANDFINDNEXT is defined as the value of IDM_SEARCH + 48. So then you look for IDM_SEARCH:#define IDM_SEARCH (IDM + 3000) So that means that IDM_SEARCH_SETANDFINDNEXT is IDM + 3000 + 48 = IDM + 3048. Looking for the definition of IDM:#define IDM 40000 So that means that IDM_SEARCH_SETANDFINDNEXT is 40000 + 3000 + 48 = 43048 But that required knowing beforehand what the internal IDM_XYZ name for the menu-command was that you wanted was. There are two good ways for finding that: In the menuCmdID.h, it is mostly organized by Notepad++ menu, so it’s not that hard to say “I want the Find (Volatile) Next command from the Search menu”, and then to look in menuCmdID.h for the Search menu entries – they start here at IDM_SEARCH, which isn’t that hard to find (for example, look in the file for SEARCH, which is the name of the menu). Once in the right section, the IDM_<section>_<command_name> is reasonably easy to map to the entries in the default English menu system in Notepad++. But that’s still a bit of effort. I make use of the NppUISpy plugin (installed from Plugins Admin), which allows you to look up what the command ID (and thus wParam="###" value) is for every built-in and currently-installed plugin command is. Once you know the ID, you can use it directly. But you can also look up the IDM_xyz name by looking for the last digit or two, and finding the ones that end in that last digit until the name makes sense for the given menu command. This Forum’s FAQs: Automating Notepad++ = https://community.notepad-plus-plus.org/topic/25400/faq-automating-notepad This has a lot about macros, and how to dig in to find even the right menu command IDs for plugin commands (plugin commands are not recordable, but the FAQ explains how to hack the recorded macro to run plugin commands with certain limitation)

    @deleelee , there is no published reference of which commands aren’t recordable – there are thousands of commands, and it’s hard to piece together the information(*). The general rule is “any command that requires user input (launches a dialog, renames a file, etc) cannot be recorded or played back; any other built-in command that can be accessed through a menu can at least be played back by a macro, though an arbitrary list of them cannot be recorded even though they can be played back; almost any normal ‘editing’ command, like copy/paste/select etc, which are handled by the scintilla component, should be recordable”. As the Automating Notepad++ FAQ explains, there is no list of which commands are specifically recordable vs not. Essentially, my recommendation is to try to record a macro, and then see if there are any commands (like the Search > Select and Find Next) that don’t end up with a corresponding entry in the macro; those are usually the commands that aren’t macro-recordable. ;-)

    (*: when I was writing up the FAQ, I tried to create a list of not-recordable-but-playable based on the source code, but I gave up after a few hours of spinning my wheels on that. It’s not a simple task.)