• Search++: A work in progress

    Notepad++ & Plugin Development
    136
    6 Votes
    136 Posts
    45k Views
    guy038G
    Hello, @coises and All, As for the first bug, I humbly apologize for the inconvenience caused : it’s my own fault. There’s no bug at all ! Indeed, in all my previous manipulations, I simply move the mouse around, to a specific location and immediately right click : thus some odd results ! As you said : (since the menu is based on the caret location), I understood that if I first clicked within a line, within a green line or within a gold line and THEN right clicked on the mouse I did get the same results as yours , i.e. : search (gold) lines should show: Expand/Collapse Search Expand/Collapse Documents file (green) lines should show: Expand/Collapse Document Open Document match (numbered) lines should show: Locate in Document Move Here in Document Again, sorry for the moise ! To end, could you verify if you can reproduce the third bug or if I forgot something obvious ? Best Regards, guy038
  • rename files

    General Discussion
    3
    0 Votes
    3 Posts
    62 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
  • 0 Votes
    1 Posts
    5 Views
    No one has replied
  • Notepad++ release 8.9.8

    Pinned Announcements
    20
    6 Votes
    20 Posts
    5k Views
    xomxX
    @JT-Moore Current workaround for now - the relevant config.xml setting needed (just use a post-install script for it or supply a pre-configured config.xml file to your users): networkPathWarningMethod="2" which means “networkPathAlwaysLoad”. i.e. edit this line: <GUIConfig name="MISC" fileSwitcherWithoutExtColumn="no" fileSwitcherExtWidth="50" fileSwitcherWithoutPathColumn="yes" fileSwitcherPathWidth="50" fileSwitcherNoGroups="no" backSlashIsEscapeCharacterForSql="yes" writeTechnologyEngine="3" isFolderDroppedOpenFiles="no" docPeekOnTab="no" docPeekOnMap="no" sortFunctionList="no" saveDlgExtFilterToAllTypes="no" muteSounds="no" enableFoldCmdToggable="yes" hideMenuRightShortcuts="no" networkPathWarningMethod="2" isFawSymlinkAllowed="false" /> Edit: There already seems to be such a helper script (I didn’t test it myself): https://github.com/notepad-plus-plus/notepad-plus-plus/issues/18319#issuecomment-5508274570
  • 3 Votes
    1 Posts
    103 Views
    No one has replied
  • 0 Votes
    6 Posts
    155 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.
  • [New plugin] Smart Math

    Notepad++ & Plugin Development
    5
    1 Votes
    5 Posts
    843 Views
    Vitalii DovganV
    The syntax file can be created by means of user-defined language. But how to apply this user-defined language automatically when Smart Math is enabled for the current file/document? OK, sorted it out: call NPPM_GETNBUSERLANG first to get the number of UDLs; then iterate through all the UDLs and call GetMenuStringW; once the menu item string matches my UDL name, I’ve identified my UDL menu id; after that, call NPPM_MENUCOMMAND with the obtained UDL menu id. Here is an example withUDL applied: [image: 1788696158249-d17e9134-3e1a-4b20-b7e9-62b16dbc4eff-image.jpeg] It’s a pity that I can’t make the keyword colors (such as function colors) to be dependent on the active color theme/style. I mean, for dark color themes these keywords in blue look too dark, so the color must be changed for dark themes.
  • Code is not working

    Help wanted · · · – – – · · ·
    4
    0 Votes
    4 Posts
    191 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
    395 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
    382 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
    404 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
    92 Views
    No one has replied
  • 0 Votes
    3 Posts
    237 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
    266 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.
  • [New Plugin] MultiReplace

    Notepad++ & Plugin Development
    80
    3 Votes
    80 Posts
    85k Views
    Thomas KnoefelT
    @guy038 Hello @guy038, Thanks for this thorough test, and no, you didn’t do anything wrong. Your investigation uncovered two separate behaviors in the code: Binary Files: MultiReplace “Find in Files” currently skips binary files, while native N++ searches every file it lists. That accounts for most of the gap in your USB drive numbers. I’ll look at how to make this configurable and more transparent. UTF-16 Bug: There is indeed a bug in how “Find in Files” handles UTF-16 encodings compared to “Find in Docs” and “Replace in Files”. This most likely explains the missing files in your smaller Test folder too. Since the forum isn’t ideal for sharing files and tracking bug fixes, I have opened a GitHub issue for this here: https://github.com/daddel80/notepadpp-multireplace/issues/133 I would gladly take you up on your offer to share the E:\Test folder contents so I can verify the fix against them. Could you please attach that folder as a zip or provide a link in the GitHub issue? Thanks again for your time and for helping to polish the next release candidate!
  • 0 Votes
    11 Posts
    602 Views
    Neculai I. FantanaruN
    @guy038 I can creat a Python script :) but the beauty and art was finding a solution just with regex.
  • Fake Notepad++ website

    Security
    3
    2 Votes
    3 Posts
    457 Views
    Lycan ThropeL
    @donho Reported to both sites per your request to help keep the community safe.
  • 0 Votes
    5 Posts
    263 Views
    PeterJonesP
    @Jacopo-Remondina , I am still not sure what you want for FOLDING and what you want for KEYWORD and what you want for DELIMITER and what you don’t want detected at all. But at this point, I’m guessing that what you want is too complicated for the simplistic keyword/token matching used for UDL. For FOLDING, it’s designed to either match spaces-not-needed so the open/mid/closing all don’t require spaces, or to match spaces-required so the open/mid/closing all do require spaces; it is not meant to mix, so that the open doesn’t require spaces but the close does. The easiest workaround is what you already know: enumerate them all. I don’t think you’re going to find a better solution.