• Read This First

    Pinned Locked
    1
    5 Votes
    1 Posts
    3k Views
    No one has replied
  • New API to fix eventual regression regarding SCN_MODIFIED for some plugins

    Pinned
    32
    2 Votes
    32 Posts
    15k Views
    ThosRTannerT

    Just a quick question - when will the plugintemplate repo be updated to include the new message?

    Thanks

  • [feature requet] New Selected Multiple Documents

    5
    0 Votes
    5 Posts
    164 Views
    PeterJonesP

    @Mit-Jean ,

    Notepad++ has a plethora of ways to decide which file(s) should undergo search/replace. I am not convinced it needs another.

    One document: Search > Replace > Replace All = does replacement whether there’s a saved file or not All open documents: Search > Replace > Replace All in All Opened Documents = does replacement whether there’s a saved file or not Across multiple files: Search > Find in Files > Replace in Files = does replacements only in files saved to the filesystem Across a specific set of files in a “Project”: View > Project Panels > Project Panel N, then in the Project Panel, Right Click on the workspace > Find in Projects (or Search > Replace, pick the Find in Projects tab) and then run Replace in Projects

    My original thought was that, instead of somehow “marking” a file for “MOD scope”, you would just add your file to the project, and use Find in Projects. But since you want to include documents that haven’t been saved to a file yet, that won’t work (because Projects require that there’s an underlying file for everything added to the Project). However, I might give the advice that it would improve your workflow (and reduce the chances of losing data) if you were able to update your workflow to always save a file to the filesystem before doing any search/replace in it (especially as a multi-file S/R, as that’s a situation where you might not notice right away that your S/R didn’t work quite as expected, and you might move beyond the undo-history before you discover your mistake). (My personal opinion is that anyone who tries to do any more editing than Create File then Save, or maybe Create File then paste boilerplate then save, is just begging their computer to lose data for them: computers crash, and applications cannot perfectly/flawlessly prevent loss of data when they do; having unsaved data is foolish, IMO. For the ephemeral stuff, I have a “scratchpad” document always open, and I make liberal use of the AutoSave plugin, as described in this FAQ. My only exception to this rule is that I often create an empty unsaved tab to paste in data from a post in this Community, verify my suggestion works, and then delete it, all with it never being saved to disk; but that’s because I know that there is a 0% chance that I would care that the data were lost if my computer crashed while I was in the middle of it, because it’s data copy/pasted from the forum.) But enough of my preaching.

    If you were to make an official feature request – like @Alan-Kilborn hinted with his link – then I would say don’t word it as you currently do: Notepad++ already has a way to apply a specific color to a document’s tab (right click on the tab, Apply Color to Tab > Apply Color N), so instead of creating yet another way of marking the file for your “MOD scope”, what I would suggest is asking for “Replace in All Tabs of Color N” where “N” is 1…5 for the five possible colors; this would make the interface very similar to the Find in Projects dialog, where you can select one of the three project panels. That way, instead of having some new concept of “MOD scope”, it would be making use of a way that Notepad++ already provides to indicate similar tabs – it would actually give you five independent “MOD scopes” simultaneously, without introducting another new concept to the N++ interface.

  • [New Plugin] MultiReplace

    74
    3 Votes
    74 Posts
    33k Views
    Mark OlsonM

    @Thomas-Knoefel
    Your idea of a plugin interface to determine if a tab is pinned seems very reasonable, so I created this GitHub issue to ask for such a feature.

  • About the 'x32' and 'x64' plugins list ...

    11
    0 Votes
    11 Posts
    489 Views
    guy038G

    Hello, @peterjones,

    My bad ! Thanks to the @dinkumoil’s post, I realized that you already fully documented the npp-compatible-versions and old-versions-compatibility attributes in the official N++ documentation ! So, most of the initial posts about this topic seem useless :-((

    Anyway, this was the occasion to revisit these important notions. As an example, if we consider the true maximum syntax, each made of 3 elements, which is :

    - "version": "a.b.c", - "npp-compatible-versions": [d.e.f,g.h.i], - "old-versions-compatibility": [j.k.l,m.n.o][p.q.r,s.t.u],

    My understanding supposes that this means :

    Latest plugin version a.b.c of the plugin works with all releases of Notepad++ between d.e.f and g.h.i, included.

    Older plugin versions between j.k.l and m.n.o, included, should work with all N++ versions between p.q.r and s.t.u , included.

    The plugin version a.b.c is more recent than, both, the versions j.k.l and m.n.o of that plugin.

    This example likely represents the case of a plugin no longer maintained after the N++ release g.h.i.

    As always, RTFM ;-))

    Best Regards,

    guy038

  • 0 Votes
    12 Posts
    334 Views
    Mark OlsonM

    @rdipardo

    But what if the given document is not UTF8, but ANSI or UTF-16?

    I’ve finally gotten around to implementing a fix for this issue in JsonTools. I did this first in JsonTools because it has a lot of features that read the text of the file. It appears to work fine for ANSI files (you can test it on this example file I added).

    As I noted in the commit message, there are some features that are broken because my JSON parser’s code for determining node position assumes that the document is UTF8-encoded.

    …or UTF-16?

    JsonTools has always worked correctly on files with any encoding except ANSI, so at least on my machine, I have just confirmed that Notepad++ internally represents documents as UTF-8 if the file itself is in UTF-16 or some exotic encoding like OEM 865.

  • JsonTools v5.5. is live!

    22
    7 Votes
    22 Posts
    11k Views
    Mark OlsonM

    @User-Name said in JsonTools v5.5. is live!:

    And then if I open any file, it opens formatted.

    Glad to hear it!

    But the first opened file is not formatted :)

    That’s probably just a limitation of how PythonScript is implemented, and I don’t think there’s anything I can do about that.

  • XBrackets Lite v1.4.0 has been released!

    5
    2 Votes
    5 Posts
    257 Views
    Michael VincentM

    @Vitalii-Dovgan said in XBrackets Lite v1.4.0 has been released!:

    The uniqueness of XBrackets is in its external simplicity and internal complexity.

    Thank you. I get 3) from the SurroundSelection plugin. Notepad++ has “Go To Matching Brace” in Search menu, but I think it only includes { [ ( ) ] }, not quotes.

    Cheers.

  • 0 Votes
    4 Posts
    120 Views
    Alan KilbornA

    @Alan-Kilborn said:

    I think it should be an absolute requirement that the title bar always starts with Notepad++ -

    Hmm, this is what I get for posting when I don’t have Notepad++ right in front of me (i.e., I get it wrong). :-(

    Now that I have it in front of me, the Notepad++ title bar shows pathname - Notepad++ or filename - Notepad++.

    My point was mainly about Notepad++ remaining somewhere in the titlebar, because this bit of consistency aids in other programs in locating the N++ main window, via the FindWindow Win32 API call. I do this a fair amount, and thus I’m projecting that I’m not alone and that others do this as well.

    Here’s a bad example; some PythonScript code:

    notepad.hwnd = user32.FindWindowW(u'Notepad++', None)

    (It’s “bad” because it isn’t necessary any longer, because newer versions of PythonScript have the notepad.hwnd variable predetermined for you – but for a long time this was not the case)

    But, if Notepad++ weren’t in the title bar text, it would not be as “easy” to locate the window, for those that need to.

    Note that the OP made no suggestion to drop Notepad++ from the title bar text; I was just thinking if the original idea was extended (as tends to happen), I’m sure someone would come up with that idea. And @Coises did call the text redundant, so that could be construed as a first step at “removal” – in quotes because of course all of these suggestions would be for optional things.

  • Ask Scintilla about the text scope such as enclosing brackets or quotes?

    8
    0 Votes
    8 Posts
    418 Views
    Vitalii DovganV

    @Coises

    SCI_BRACEMATCH is pretty useful as well, when dealing with (), [], {} and <>.

    As for “” and ‘’ (as well as other possible situations when SCI_BRACEMATCH returns -1), the internal functions findLeftBracket and findRightBracket in XBrackets Lite do pretty good job there.

    The exported functions GoToMatchingBracket and SelToMatchingBracket already work, though may need some tuning. The source code is here:
    https://github.com/d0vgan/npp-XBracketsLite/commits/feature/GoToNearestBr/

  • Improving programming speed and performance in Notepad

    2
    0 Votes
    2 Posts
    163 Views
    PeterJonesP

    @Silva-Yunus ,

    The CustomizeToolbar plugin allows you to add menu commands (including saved macros) to the main toolbar, so it’s almost what you are asking for.

    Otherwise, we have a FAQ on Feature Requests

  • Auto-Completion Popup is unexpectedly shown when handling SCN_CHARADDED

    11
    1 Votes
    11 Posts
    376 Views
    Vitalii DovganV

    Eventually, it seems the best solution is to subclass Scintilla’s WndProc (for both Main and Secondary Scintilla window) and to handle WM_CHAR there.
    The benefits:

    no need to bother with Scintilla’s native notifications and their nuances; full control and clarity of what happens and when it happens: within own WM_CHAR handler, we are able to process a character before it goes to Scintilla and after it goes to Scintilla; simplified code because all the logic is controlled by you and there is no need to conform to Scintilla’s way of processing the events.
  • POLL / Discussion: taking over a plugin

    7
    3 Votes
    7 Posts
    321 Views
    ThosRTannerT

    I’m not entirely sure how to vote on this because - if with the permission of the original author, I don’t think a new name would be required. However, any other option should have a new name

  • Handling Ctrl+C in a c++ plugin dialog

    3
    0 Votes
    3 Posts
    161 Views
    PeterJonesP

    @Thomas-Knoefel ,

    Well, that got me farther. With some keystrokes, like a normal letter, or a key-combo that’s not assigned to anything in Notepad++ (like Shift+Ctrl+C), it will call that subclass function and see the uMsg==WM_CHAR. But Ctrl+C doesn’t trigger it; and if I try a shortcut that does something obviousl in N++, like Alt+C (for the Column Editor).

    But that reminded me of the recent conversation about shortcut mappings, and so I tried sending the appropriate NPPM_MODELESSDIALOG arguments during my plugin’s init & destroy, and now it can capture Ctrl+C (or any other shortcut).

    Thank you

  • How to create a C# plugin?

    38
    0 Votes
    38 Posts
    9k Views
    EkopalypseE

    @PeterJones

    I haven’t checked the Scintilla source code, but I’d be surprised if the code didn’t just ignore the alpha value.
    A quick test seems to confirm this.

    81a75ca8-8b44-4ca7-90cf-a0e31b288f38-{D5638942-D3BC-41B4-83BB-90B7C809D881}.png

  • 3 Votes
    1 Posts
    156 Views
    No one has replied
  • [New Plugin] CSV Lint

    83
    6 Votes
    83 Posts
    101k Views
    A

    I had sent a comment before this one which is not yet visible to me.

    Just wanted to let you know it seems solved. Other plugins struggled as well so I completely uninstalled npp and started from scratch. Now it works for me as a normal user.

  • Hi and I'm working on a WPF fork of NppCSharpPluginPack

    18
    1 Votes
    18 Posts
    2k Views
    Jonathan JohansenJ

    I figure I’d better document the solution(s) for others that may tread this path. A summary of some of the steps needed (of course built on top of Mark’s work!):

    Ensure you register your modeless dialog with NPP (NPPM_MODELESSDIALOG, in Main.cs we call NppFormHelper.RegisterFormIfModeless(Form, bool)) The WPF System.Windows.Controls.UserControl should be in an System.Windows.Forms.Integration.ElementHost, which is in a System.Windows.Forms.Form. I’ve subclassed the ElementHost to handle WM_SHOWWINDOW to update the Visible property, and to trigger a (slightly delayed) refresh of the visuals when we get a WM_SIZE. There I invalidate the visuals and update layouts. There may be a way to skip this, but it’s working, so I’m not trying to fix it. In the WPF UserControl, when it’s Loaded, we have to get the presentation source (as a HwndSource) and add a hook to respond to the WM_GETDLGCODE and tell the source that we DLGC_WANTCHARS and DLGC_WANTARROWS, and maybe we also need DLGC_HASSETSEL.

    I’ve pulled most of it into a method called MakeModelessDialog. And now for a short recording of it working!

    2025-06-28 Typing in Notepad++ modeless WPF dialog works.gif

  • 0 Votes
    4 Posts
    504 Views
    FraF

    @PeterJones Thanks for the input.

    Surprisingly, just dragging and dropping all the files at once onto Notepad++ opens all the files in about 5 seconds for 1000 files.

    Then the XML Tools takes about 10 seconds to prettify all opened files.

    Then just go to File > Close All so to not have to close each file manually.

    Will do it that way.

    Would be great to update the XML tools plugin if someone’s able and it is not to much work.

    Or just adding the Pretty Print feature directly to the Find In Files feature as extra function for the next Notepad++ update.

  • Suggestion about Right Click Context Menu

    3
    0 Votes
    3 Posts
    324 Views
    Maciej ZetM

    @pbarney BIG thanks as this is was I looking for.
    Just for the record - just checked and 2 entries is also fine:

    Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\Edit with Notepad++ from line 450\Command] @="\"C:\\Program Files\\Notepad++\\notepad++.exe\" \"%1\" -n450 %*" [HKEY_CLASSES_ROOT\SystemFileAssociations\.ps1\Shell\Edit with Notepad++ from line 450] "Icon"="C:\\Program Files\\Notepad++\\notepad++.exe"

    and perfect icon appear :)