• Notepad++ release 8.9.8

    Pinned Announcements
    24
    6 Votes
    24 Posts
    5k Views
    PeterJonesP
    @GrobiDev , I assume you are using scoop, or some other package manager that uses junctions in the path to Notepad++. v8.9.8 introduced an issue where that will not work. It has already been fixed in the codebase, so the next version will not have that problem (release candidate for v8.9.8.1 should be soon). In the meantime, you can go back to v8.9.7
  • Search++: A work in progress

    Notepad++ & Plugin Development
    140
    6 Votes
    140 Posts
    46k Views
    guy038G
    Hello, @coises and All, So here are my thoughts on the various points you raised in this post. Of course, these opinions are my own and do not reflect the views of anyone else ! Regarding the obvious missing features : You said : Implement Replace in Files in the Search in Files dialocg. I’m very interested in this feature because the search function is already very flexible: searching by size or date, or selecting files using regex => Thus; this would allow for highly customized replacements ! You said : Ability to save and recall search strings. I’d lean toward a configurable number of items, between 1 to 30 maximum, in the history, which, in my opinion, would not be used very often, if the saving S/R feature is implemented ! You said : Would the ability to “pin” history items be useful? (Simpler and faster than a save process.) Personally, I think that saving S/R is preferable ! You said : For saving I’m thinking of controlling that through a dialog that would let you name what you save, so you would then recall it by name. Saving would save the Find and Replace strings and the associated settings. It would have to be possible to edit, rename or delete a saved search as well. Recalling would probably be by selecting from a flyout on the right-click menu. Thoughts? Is that too complicated? I’m globally very much in favor of this system ! You said : Should the regular dialog (for searching in documents) and the Search in Files dialog share a single set of saved searches? The type of search and replace performed on a set of files is generally different from that performed on a single file or on a few files opened in an Notepad++ session => Therefore, if possible, the use of two separate lists would be nice, but don’t bother too much about it ! Regarding the features under consideration : You said : 1 Context in search results: that is, showing one or more lines before or after the line(s) containing a match. This would be optional and configurable, but a tricky question is whether it is sufficient to configure it before the search or whether you should be able to request context — either for a specific match or for all matches — directly in the search results window, after the search. Personally, I suppose that asking for 1 to 5 lines before / after the context, once the search ended, should be sufficient ! You said It seems like it would make sense for this to be available for Show actions, too. Yes it would. I agree with your opinion ! You said : 2 Warn or block when characters used in the find or replace fields are inconsistent with the character encoding of files to be searched. (Right now find proceeds without a warning, and replace uses the substitution character, usually a question mark.) I would say : displays a warning and tell that any non encodable character will be replaced with an interrogation mark ! You said : Find is tricky, because I would have to parse the regular expression to attempt to determine whether the inconsistent characters are required for a match (so no match is possible) or whether they are only required by some alternatives (which might be intentional, if the same expression is used with files in different encodings). Is it worth doing at all? Would a warning (so I didn’t have to parse, since you could just say to search anyway) be more annoying than helpful? The more simple , the best ! Don’t analyze files first : just put a warning, before the search, that any non encodable character will be changed into an ? symbol, within the Search++ results panel ! You said : Replacing can also be conditional, so do I try to detect that, and if it’s conditional, only warn or block if it actually happens? If replacing in multiple files, it could vastly slow down the process if I have to examine each file first to determine its encoding before beginning the actual replace operation. Is it worth it? Or do I only raise the warning if and when I encounter a file that can’t do the replace as written? As above, just a warning, before the replacement, that any non-encodable character will be replaced with a ? symbol ! You said : 3 In the main search dialog, when the default action is active for a button (e.g., Find, Count, etc. without a scope qualification like “in Selection” or “in Marked Text”), somehow indicate what the default action would be if you pressed the button right now. That is, Find adapts to work in selection if you have a selection large enough, or in marked text, or in the whole document, but what will it actually do right now? This feels like a big missing thing to me, but I’m a bit stumped as to how to indicate it. If a put a general indicator somewhere (it will always be the same for all buttons with default scope), where, and how should it appear? I am very hesitant to take up additional space in the dialog, or to make it any more “busy” than it already is. If I show it on each button, how would I distinguish it from the marker that tells you the direct action for the button is a command with a specified scope? (Remember, this has to work for any dark mode color combination the user might pick, and some users are colorblind.) Would it be better to show it on the buttons and remove the ability to select an action with other than default scope as the action for a button by shift-clicking the drop-down menu? Does anyone even realize they can shift-click the drop-down menus (the only way to know is to do it by accident or read the help)? Personally, I’m rather in favor of your last point. That way, we would know exactly which operation has just been performed, and it would be really helpful when pressing the Search button , on the right of the Search++ panel — which would clearly indicate whether we’ve selected : a list, a selection, a mark, or just the results of a search ! You said : Figure out how to modify Boost.regex to get rid of the dreaded “complexity” message. Make progress responsive during a search (not just between finds, as it is now: Boost.regex as built has no progress callback, so you can only estimate progress after it succeeds or fails to find a match, not while it’s working) and let the user cancel if it’s taking too long. I do not think this point is essential. Check out my post at https://community.notepad-plus-plus.org/post/106252. Apparently, for certain regular expression searches, this specific message, about complexity, may appear (even though the result is correct) when the scanned file contains an average number of lines, with nice results for smaller files and an error for big files ! You said : 5 Figure out how to modify Boost.regex to support Unicode word boundaries, and extend that to plain text searches by translating them into regex searches. (Unicode word boundaries recognize that sequences like “can’t” are a single word; for example, if implemented, a whole word match for “can” wouldn’t match the first three letters of ”can’t”; at present, it does.) This point does not seem essential either, at least at first ! You said : 6 Implement “Unicode compatibility forms” matching. This means being able to search for something like “naive” and have it match “naïve” (or vice versa). I think I would only attempt to implement this, at least at first, for plain text searches (which would be translated to a regular expression the user would not see). This option seems interesting, and I’m definitely in favor of it! Regarding the Deficiencies and bugs : You said : 1 Personally, I really like the Show function. It hides all lines and then shows the ones that have matches, also marking the matches. A bit like a Find All with the results list right in the document instead of in a tiny little window at the bottom. But there are problems. I use Scintilla’s hidden lines feature directly. Notepad++ also uses that feature, but it doesn’t provide a way for plugins to use it through Notepad++, and it keeps internal status information that assumes only it is using hidden lines. There appears to be no way to make Notepad++ synchronize its own idea of which lines it thinks are hidden with the actual state of Scintilla. Various bizarre things happen because of this. That leaves me with four choices, none of which are great: Remove the Show function entirely. Accept that if you use Show, unintended and illogical things can and will happen. Petition Don to provide a way for plugins to use hidden lines without confusing Notepad++, which might not be accepted, would probably take a long time even if it is accepted, and even when completed would mean this would only work correctly on versions of Notepad++ at least that new. Get “creative” and look for some back-door, hacky way to fix it (which might or might not be possible, and might break without warning when Notepad++ changesc something). I would keep option 2 ( Accept the SHOW feature as is ) and, eventually, ask @DonHo about the hidden lines ! You said : 2 Keyboard navigation in the Search++ dialog (the main one that can be docked, not the Search in Files dialog) is clunky and not comprehensive. There’s no straightforward way to invoke something like “Select in Marked Text” without using the mouse. There’s a setting to focus the document after stepwise Find and Replace, but if you check that then there’s no way to do the next Find or Replace without switching back to the Search++ dialog first. The only way I can think of to manage that would be to add two more menu items, which you could assign to free keyboard shortcuts… as if anyone has any free yet memorable keyboard shortcuts. Doing repeated Find actions while being able to edit immediately in the document after a Find seems like a common task. It should be natural and fluid, but it isn’t. I didn’t quite understand this specific point. Personally, I do not see any major difference between whether or not to enable the Focus the document after option named : stepwise Find and Replace commands ? Could you clarify this for me ? You said : 3 For Search in Files actions, there is presently no warning about files that are open in Notepad++; the files are processed on disk. This will be more critical when Replace in Files is implemented. My thought is to present a warning, with OK and Cancel options, noting that Search in Files only processes files on disk. Note that for Find in Files, the impact is that files that were open with changes would search based on the data on disk, not the live version of the document. Documents that are open in Notepad++ (with or without changes) and are also changed on disk by Replace in Files would show a “File changed” notification when activated in Notepad++. Because of the way Search in Files works, it would be complicated to treat files open in Notepad++ differently, but is that something that is really important… important enough to go ahead and make the code more complicated in order to do it, so that files open in Notepad++ are processed as open documents and not as files on disk? As I mentioned in a previous post, because of your multithreaded approach, you need to scan the files stored on disks. This is not a problem for me, as long as it’s indicated by a warning that could be dismissed until the next time Notepad++ is opened. You said : 4 The date selection controls in the Search in Files dialog look awful in dark mode. Unfortunately, it turns out the Windows control I used is just about impossible to render in dark mode. (At least, I haven’t found a single example in open source of someone doing it successfully.) So I expect to replace it with something simpler, more like a text control with a drop-down history, where you just type the date. Would it be useful to be able to enter the time, and not just the date, to limit which files are examined? I do not think it’s necessary to include the time, since a specific date has already been selected : the search would then be limited to files from a given day, which doesn’t seem like an insurmountable challenge ! You finally said : Would a single universal format (yyyy-mm-dd) be good, or is it an important user amenity to be able to enter dates in your locale format (e.g., mm-dd-yy in the US, dd-mm-yy in most other places)? Would you miss the drop-down calendar control? Would you miss having up/down arrows (spin control) for the elements of the date and thus needing to type the numbers to change the date? Does anybody even think the date filter is useful in the first place? Do I need a way to take a date from a specific file, rather than the user knowing what dates are wanted, to make it useful? Technically speaking, using the universal format (**`yyyy-mm-dd**), in text mode, would certainly be easier to implement and would also ensure correct display in both modes ( light and dark ) ! Of course, a reminder of the syntax to use would be necessary ! Best Regards, guy038
  • wireloom in markdown viewers

    Notepad++ & Plugin Development
    7
    0 Votes
    7 Posts
    305 Views
    rdipardoR
    @Keith-Collyer said: I ended up adding a request to the markdig library here: https://github.com/xoofx/markdig/issues/952 👍
  • [New Plugin] MultiReplace

    Notepad++ & Plugin Development
    81
    3 Votes
    81 Posts
    85k Views
    Thomas KnoefelT
    MultiReplace 6.1 is out and will land in Plugin Admin with the next Notepad++ release. The focus of this release is Replace All in One Pass, running the whole list in a single left-to-right sweep instead of one full pass per entry, together with a reworked Find/Replace in Files and a handful of list and UI improvements. Several new options live under Plugins > MultiReplace > Settings. Download: Latest build Key Features & Improvements Replace All in One Pass: Runs the whole list in a single pass instead of one full Replace All per entry, so results build on each other left to right. With cat → dog and dog → cat, sequential mode turns “cat dog” into “cat cat”, one pass turns it into “dog cat”. Much faster on large documents. Toggle per tab, right-click the list tab. Use Open Documents: Find/Replace in Files can now work on files already open in Notepad++ as the live document, unsaved changes included, instead of the copy on disk. New checkbox in Settings. Skip Binary Files: New option for Find/Replace in Files (on by default), same detection as ripgrep and VS Code. Also adds UTF-16 detection without a BOM, and skipped files are always reported, broken down by reason. CSV Header Rows: Find/Replace now always searches header rows too. “Header rows to exclude” only protects sorting and duplicate detection. Collapse to File List: New Search Results dock option folding every search block down to just file names and hit counts. Ctrl/Shift-click works in the fold margin, same as Notepad++'s own Search Results panel. Library Mode: “Keep list always visible” can now be switched right from the Use List button’s context menu, no detour through Settings. Add New Row: Takes over the dialog’s current search options instead of starting all off. Find/Replace text still starts empty. Duplicate Row Reporting: A list row that exactly duplicates an earlier enabled one is skipped as before, but the status line now tells you how many rows were skipped. [image: 1789296944806-e15a9d23-6db6-4411-a694-d44fc95300e5-image.jpeg] Issues or suggestions: GitHub. Happy replacing!
  • SetFirstVisibleLine not working?

    Notepad++ & Plugin Development
    10
    0 Votes
    10 Posts
    2k Views
    PeterJonesP
    @peter-wall said: It works if that setting is off. It works, full stop. You just need to understand the documentation. As ScintillaDoc says for SCI_SETFIRSTVISIBLELINE, “These messages retrieve and set the line number of the first visible line in the Scintilla view. The first line in the document is numbered 0. The value is a visible line rather than a document line.” (emhasis added). The “document line” in Scintilla is the same thing that Notepad++ numbers in the line number column: it’s the real line, no wrapping. The “visible line” is affected by hiding lines and/or wrapped lines: if you have lines hidden in the document, that can decrease the visible line index relative to the document line number; if you have lines wrapped, that can increase the visible line index relative to the document line number. Scintilla has commands like SCI_VISIBLEFROMDOCLINE and SCI_DOCLINEFROMVISIBLE to help transform between the two concepts, and SCI_WRAPCOUNT will help you determine how many visible lines a single document line will become. If you want to turn word wrapping off, set your visible line, then reinstate word-wrapping, that’s fine; but the Scintilla messages provide other ways to allow you to correctly handle visible-line vs display-line.
  • Set or change the default font in NP++

    General Discussion
    3
    0 Votes
    3 Posts
    156 Views
    PeterJonesP
    @Charles-Billow said: I see how to change fonts etc. for the document I am working on, but how do I change the default font/size/ and zoom level as the default for all new documents? The way you phrased that makes me think you might not understand what a text editor is. Text files are stored as the raw text: no individual text file / text-based-document has any concept of its own font or font-size. It is just text, and it is up to the text editor to decide what font or size to use. If you set Notepad++ to use a specific font or font-size, using the dialog that @markusbodensee shared with you, that will affect how Notepad++ displays it, but MS notepad.exe or VS Code or gvim will all use their own font and size, because it’s up to the app, not the file, what font and size to display text in. If you’ve changed the font and size that’s used “in the current document” in Notepad++, you’ve changed the font and size for all documents, new or old, in Notepad++. As far as Zoom level goes: Notepad++ remembers your previous zoom when you exit. But if you’ve set a reasonable font size as your default, then zoom should normally be at 100% (which is the default if you haven’t zoomed in or out yet). If you’re to the point that you start thinking you want to have the default zoom bigger or smaller than 100%, then think to yourself: do you really mean that you should change the font size bigger or smaller, instead? (Then again, some people are still killing trees from their text editor, so if you’re printing to paper, maybe you have one of the few use cases where it makes sense to use a smaller font but larger zoom, or vice versa.)
  • 0 Votes
    11 Posts
    428 Views
    B
    @PeterJones Thank YOU so much I copy Your overrideMap & udl_markdown in my folder and problem is solved. I wish program by default have this option. Thank you again dear Peter
  • [New plugin] Smart Math

    Notepad++ & Plugin Development
    6
    1 Votes
    6 Posts
    972 Views
    Vitalii DovganV
    Now the plugin supports the Dark Mode by means of “SmartMath_Dark.udl.xml” (in addition to “SmartMath.udl.xml” which is the light one) and automatically applies either light or dark one. This is achieved by listening to NPPN_DARKMODECHANGED and requesting NPPM_ISDARKMODEENABLED to understand whether the dark UDL or the bright UDL to apply. A screenshot: [image: 1788983575005-055b172d-4091-4e16-a090-23e678758707-image.jpeg] Feel free to propose better colors if you are good in that :) The UDLs are here: https://github.com/d0vgan/npp-smart-math/tree/feature/powerful-calc/Notepad%2B%2B/userDefineLangs
  • rename files

    General Discussion
    3
    0 Votes
    3 Posts
    166 Views
    guy038G
    Hello, @francisco, @gerdb42 and All, There are plenty of solutions ! The following one will ensure that the . matches newline option will not be used even it’s checked and that the Match case option is enabled even it’s not checked ! FIND (?-si)_.+(?=\.txt) REPLACE Leave EMPTY Best Regards, guy038
  • 3 Votes
    1 Posts
    195 Views
    No one has replied
  • 0 Votes
    6 Posts
    234 Views
    CoisesC
    @Midnitecata said: @PeterJones thank you for your help, ill probably steer clear of it just out of caution, but i might look into it further should the tedious formatting inconvenience me enough to learn how to spot malicious code! thanks again!! :) Just a side note to this discussion: While you certainly can manipulate *.srt files in Notepad++ (and I do on occasion), for most purposes the free and open source program Subtitle Edit (found here on GitHub) is much easier to use. It has many functions for doing things like shifting times, identifying likely errors, and so on. Before working too hard to find a way to do something with a subtitle file in Notepad++, I recommend checking first to see if Subtitle Edit already knows how to do it.
  • Code is not working

    Help wanted · · · – – – · · ·
    4
    0 Votes
    4 Posts
    273 Views
    guy038G
    Hello, @blake-g.-barrington, @peterjones, @coises and All, Here is my version to get duplicate lines, separated by any number of lines ( whatever they are : true empty lines, blank lines or lines with text ), even zero line : MARK (?-si)^(.+)(?=(.*\R)+\1$) As said by @Peterjones, and after some tests, this kind of regex get into trouble when the bunch of lines, between two duplicate lines, exceeds 15,000 empty lines about ! Now, Let’s suppose you create this text file : first 0002 0003 0004 0005 .... .... .... 9997 9998 9999 10000 first Then the (?-si)^(.+)(?=(.*\R)+\1$) regex returns : Correct result until the number of the in-between lines does not exceed 1,600, with the message 1 match in entire file Correct result until the number of the in-between lines does not exceed 12,000, although the error message Find Invalid Regular Expression ( So F.I.R.E. !! ) occurs ! NO result at all if the number of lines is over 12,000 lines, with, of course, the error message Find Invalid Regular Expression Best Regards, guy038 P.S. : I should add that my Windows11 laptop has 32 Gb of memory !
  • adverts on download page?

    General Discussion
    6
    0 Votes
    6 Posts
    443 Views
    cosmic-hyenaC
    @PeterJones I sent him an email but got no reply. Overall I’m a bit disappointed with this. I think for all his good intentions he’s allowing a strong chance of people accidentally clicking on these malware links, Got nothing more to add. Thanks.
  • ASCII Sort Order

    Help wanted · · · – – – · · ·
    7
    0 Votes
    7 Posts
    420 Views
    L
    @PeterJones, Thank you for your considered (and considerate) engagement. I actually hesitated to respond with my comment about the 70s and 80s, pretty sure I would get what you gave, but I couldn’t resist—I’m old (83 next month). Anyway, thanks again for putting up with me. …lee
  • 0 Votes
    3 Posts
    1k Views
    D
    @Roberts-Rozis Kudos. I want this feature too. I want to search my source code project, shared, and library folder to one level deep only because the library folder is very wide and deep, quadrupling the search time.
  • 0 Votes
    8 Posts
    458 Views
    rdipardoR
    @PeterJones said: If you’ve got steps that work for doing a local debug build, that would be helpful. > where cmake C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe > type .\build_gup.ps1 param ( [string]$Configuration = "Debug", [string]$Platform = "x64" ) if (-not $(Test-Path "${PSScriptRoot}\wingup\.git")) { git clone --single-branch https://github.com/notepad-plus-plus/wingup.git wingup } try { pushd "${PSScriptRoot}\wingup" $CmakeArchParam=$(if ("$Platform" -imatch "x86") {"Win32"} else {"$Platform"}) $LibPlatform=$(if ("$Platform" -imatch "Win32") {"x86"} else {"$Platform"}) cmake -S ".\curl" -B ".\curl\build\$LibPlatform" -A $CmakeArchParam ` -DBUILD_SHARED_LIBS=OFF ` -DCURL_STATIC_CRT=ON ` -DBUILD_CURL_EXE=OFF ` -DCURL_USE_SCHANNEL=ON ` -DCURL_USE_OPENSSL=OFF ` -DBUILD_TESTING=OFF ` -DUSE_LIBPSL=OFF ` -DCURL_USE_LIBPSL=OFF ` -DUSE_NGHTTP2=OFF ` -DUSE_LIBIDN2=OFF cmake --build ".\curl\build\$LibPlatform" --config $Configuration pushd vcproj msbuild GUP.sln /v:m /p:configuration=$Configuration /p:platform=$LibPlatform popd } catch { $_.InvocationInfo.PositionMessage; $_.Exception.Message } finally { popd } > powershell .\build_gup.ps1 Debug x86 # ...
  • 0 Votes
    6 Posts
    2k Views
    P
    Hi! A bit late, maybe my ZeroBasedColumn plugin could help with what you’re looking for. It makes the column numbering in Notepad++ start from 0 instead of 1. https://github.com/pasqualeambrosio/ZeroBasedColumn Hope it helps!
  • [New Plugin] ZeroBasedColumn

    Notepad++ & Plugin Development
    1
    0 Votes
    1 Posts
    105 Views
    No one has replied
  • 0 Votes
    3 Posts
    253 Views
    MarkusBodenseeM
    Microsoft didn’t remove the prompt, but made it configurable, so you can decide if you want to keep it or not. Configuration can be found for example with right click --> properties on the recycle bin icon.
  • 0 Votes
    7 Posts
    311 Views
    CoisesC
    @PeterJones said: PeterJones said: I assume the Search++ syntax would be the same Per the Search++ announcement, it can do the numeric calculations that were first developed for Columns++. I should update the FAQ soon… I recommend waiting on that update. Search++ is not “production ready” yet. People shouldn’t be using it at present unless they want to be beta testers. Once I reach a 1.0 release I’ll make a serious effort to avoid changing things that people would expect to stay the same, but right now, anything could be changed at any time. Numeric expressions in Search++ do not have quite all the features of numeric expressions in Columns++; in particular, the history options (using the values captured or computed in a previous match) aren’t supported in Search++, and the exprtk return statement isn’t supported. However, I think all the features directly cited in the Math FAQ are included. The reg(1) syntax still works, but in Search++ you can use $1 as well. However, a quirk is that since Search++ doesn’t have the persistent Decimal separator is comma option of Columns++, it’s necessary to use regc(1) or $$1 for European-style numbers with periods and/or commas. Finally, Columns++ can only work on the active document. Search++ has a Find in Files option, but Replace in Files has not yet been implemented. So if your guess was correct and @neculai-i.-fantanaru wants a regular expression because it must be applied to many files at once, @thomas-knoefel’s MultiReplace is the best choice among presently-existing options. Oh, and MultiReplace has recently added an option to use exprtk formulas as an alternative to its Lua syntax.