• 0 Votes
    5 Posts
    326 Views
    PeterJonesP

    @Coises said in I go to Style Configurator set a new font size Using Global Styles, save and nothing happens:

    if someone set a value in Global Override before it was moved … They’re still changing the first entry in the list.

    If they did, and it moved for them, they would have had to delete stylers.xml and let a new one be generated in the new order (or manually re-ordered), because stylers.xml doesn’t get overwritten to the new order when you upgrade from a version before the re-order to a version after the re-order. (Hence, my Config Updater plugin, to apply those kinds of fixes.)

    So, except in the unlikely event that they deleted their stylers.xml and let it be re-generated, then all that remains is that either it was in the old order and probably still is in the old order (but their understanding has improved, and they are now correctly looking at the Default Style), or it was in the new order and had all the modern warnings in the GUI and they still checkmarked the override. I find the still-in-old-order the most likely scenario, but that’s just my estimate. (Thus, I disagree with your conclusion that “They’re still changing the first entry in the list”, as it seems unlikely to me that they deleted/regenerated stylers.xml, because that doesn’t seem a natural behavior of any normal user, to me.)

    My point in linking to the manual is that it’s all explained in there, and explains how to fix the stylers.xml to move Global Override to the end, even if it’s not at the end, so that you never accidentally use the Global Override.

  • Installation Bug?

    5
    1 Votes
    5 Posts
    431 Views
    mpheathM

    @xomx

    Thanks for the confirmation. Issue has been posted at Github #16896 .

  • Notepad ++ Plugin Geneator

    3
    0 Votes
    3 Posts
    221 Views
    Mark OlsonM

    @ISSUE-BADGE

    If your plugin concept is very simple, you might find it easier to write a PythonScript script rather than writing a full-blown plugin.

    If you need to write a full plugin and you’re used to working with garbage-collected languages like Python/Java/JavaScript, I’d recommend starting with NppCSharpPluginPack, which is a C# plugin template that I actively maintain.

  • Drag-and-drop not working in editor

    3
    0 Votes
    3 Posts
    224 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
    177 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.

  • 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
    502 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
    224 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
    307 Views
    Robert Or Janet DiebelR

    @guy038 Thanx much for your help

  • Search/Find Dialog

    5
    0 Votes
    5 Posts
    336 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
    263 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
    247 Views
    S

    @PeterJones Thank you.

  • How to replace any text between some text without specifics

    3
    0 Votes
    3 Posts
    322 Views
    th3lifeoftorchT

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

  • 0 Votes
    5 Posts
    273 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
    597 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.)

  • notepad ++ adjust indentation

    8
    0 Votes
    8 Posts
    12k Views
    T

    @PeterJones I just registered an account to say thank you for mentioning what specific version changed the location of this setting. I came to this thread wondering where to change tabs to spaces. I knew there was a setting somewhere, I just couldn’t remember where, and apparently I must have missed that autoupdate for whatever reason (I don’t remember disabling auto updates but nonetheless I was outdated by a few minor versions), so knowing the setting got moved between versions, and particularly what version, was helpful.

  • 2 Votes
    22 Posts
    3k Views
    Alan KilbornA

    @mkupper said:

    I discovered that the Find field is limited to 2046 characters.

    It looks like in the next release of Notepad++ this is going to get bumped up to around 16384 characters. See https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16855 for details.

  • how to resize plugin window

    2
    0 Votes
    2 Posts
    180 Views
    PeterJonesP

    @ccoreymcmillan said in how to resize plugin window:

    . it wont let me resize the window and i am super green

    It is up to each individual plugin author to decide whether a dialog should be resizeable, and if so to include the code to make it resize. If the plugin author didn’t make it resizeable, there is nothing you or Notepad++ can do to change that. Sorry

    i would include a screenshot but don’t see a file upload or anything

    You can just paste the image in your post.

  • 0 Votes
    20 Posts
    35k Views
    C

    Yes, this is annoying but you can put your backup anywhere you want and then create a symbolic link in the hardcoded location that points to your real backup. That is what I did and it works seamlessly. Should be able to update the path but this is a pretty clean workaround.

  • numeri casuali

    4
    0 Votes
    4 Posts
    309 Views
    guy038G

    Hello, @stephano-brovelli and All,

    From wikipedia, for example, here is the list of the 20 most common surnames in England, which will be our INPUT text :

    Surname Percentage Smith 1.26 Jones 0.75 Taylor 0.59 Brown 0.56 Williams 0.39 Wilson 0.39 Johnson 0.37 Davies 0.34 Robinson 0.32 Wright 0.32 Thompson 0.31 Evans 0.30 Walker 0.30 White 0.30 Roberts 0.28 Green 0.28 Hall 0.28 Wood 0.27 Jackson 0.27 Clark 0.26

    So, let’s suppose you want to insert, a column of random numbers between the Surname and Percentage existing columns. Follow this road map :

    First, determine the number of rows of your list : in our example we have 20 rows

    After your list, create 20 consecutive empty lines

    Move back to the beginning of these empty lines

    Open the Column editor ( Alt + C )

    Select the Number to Insert option

    Chose 1 for each option and Zeros or Spaces for leading characters

    Select the DEC format

    Click on the OK button

    => Of course, you’ll get this simple list :

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

    Move back to the beginning of that list of numbers

    Do a normal selection of the lines ( from line 1 to line 20 )

    Use the Edit > Line Operations > Randomize Line Order option

    => You’ll get, for instance, this kind of OUTPUT :

    9 5 20 18 19 3 7 6 17 8 16 2 14 1 4 15 10 12 11 13

    Move to the first number of this new list, at column 1

    Hold down the Alt and Shift

    Do a zero-width column selection of these 20 numbers, with successive hits on the Down arrow

    Click two times on the Right arrow key, to select the complete numbers

    Click on the Ctrl + C shortcut

    Go to the beginning of your present list

    Put the caret/cursor on the 15th column of the first line Smith

    Click on the Ctrl + V shortcut

    => You should get your expected OUTPUT text, below :

    Surname Percentage Smith 9 1.26 Jones 5 0.75 Taylor 20 0.59 Brown 18 0.56 Williams 19 0.39 Wilson 3 0.39 Johnson 7 0.37 Davies 6 0.34 Robinson 17 0.32 Wright 8 0.32 Thompson 16 0.31 Evans 2 0.30 Walker 14 0.30 White 1 0.30 Roberts 4 0.28 Green 15 0.28 Hall 10 0.28 Wood 12 0.27 Jackson 11 0.27 Clark 13 0.26

    Best Regards,

    guy038

    Ciao, @stefano-brovelli e tutti,

    Da wikipedia, ad esempio, ecco la lista dei 20 cognomi più comuni in Inghilterra, che sarà il nostro testo INPUT :

    Cognome Percentuale Smith 1.26 Jones 0.75 Taylor 0.59 Brown 0.56 Williams 0.39 Wilson 0.39 Johnson 0.37 Davies 0.34 Robinson 0.32 Wright 0.32 Thompson 0.31 Evans 0.30 Walker 0.30 White 0.30 Roberts 0.28 Green 0.28 Hall 0.28 Wood 0.27 Jackson 0.27 Clark 0.26

    Supponiamo quindi di voler inserire una colonna di numeri casuali tra le colonne Cognome e Percentuale esistenti. Seguire questa tabella di marcia:

    Per prima cosa, determinare il numero di riga dell’elenco: nel nostro esempio abbiamo 20 righe

    Dopo l’elenco, creare 20 righe consecutive vuote.

    Tornare all’inizio di queste righe vuote.

    Aprire il Column editor ( Alt + C )

    Selezionare l’opzione Numero da inserire.

    Scegliere 1 per ogni opzione e Zeri o Spazi per i **caratteri di testa

    Selezionare il formato DEC

    Fare clic sul pulsante OK

    => Naturalmente, si otterrà questo semplice elenco:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

    Tornare all’inizio dell’elenco di numeri

    Effettuare una selezione normale delle righe ( dalla riga 1 alla riga 20 )

    Utilizzare l’opzione Modifica > Operazioni di riga > Randomizza ordine righe.

    => Si otterrà, per esempio, questo tipo di OUTPUT :

    9 5 20 18 19 3 7 6 17 8 16 2 14 1 4 15 10 12 11 13

    Passare al primo numero di questo nuovo elenco, alla colonna 1.

    Tenere premuti i tasti Alt e Shift.

    Eseguire una selezione a larghezza zero di colonna di questi 20 numeri, premendo successivamente la freccia Giù.

    Fare clic due volte sul tasto freccia Destra per selezionare i numeri completi.

    Fare clic sulla scorciatoia Ctrl + C

    Andare all’inizio dell’elenco presente

    Posizionare il cursore sulla 15° colonna della prima riga Smith

    Cliccare sulla scorciatoia Ctrl + V

    => Dovreste ottenere il testo aspettato OUTPUT, qui sotto:

    Cognome Percentuale Smith 9 1.26 Jones 5 0.75 Taylor 20 0.59 Brown 18 0.56 Williams 19 0.39 Wilson 3 0.39 Johnson 7 0.37 Davies 6 0.34 Robinson 17 0.32 Wright 8 0.32 Thompson 16 0.31 Evans 2 0.30 Walker 14 0.30 White 1 0.30 Roberts 4 0.28 Green 15 0.28 Hall 10 0.28 Wood 12 0.27 Jackson 11 0.27 Clark 13 0.26

    Cordiali saluti,

    guy038

    Tradotto con DeepL.com (versione gratuita)