Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      230
      7 Votes
      230 Posts
      115k Views
      CoisesC
      @guy038 said: Now, use the Replace All Before in Whole Document option => Message No match found before current position ! Why ? to my mind, the (?s)^xyz.+|^abc.+ regex should have matched the 3 lines : abc with some text to see Matching before and after are defined as: Before applies the command action only to matches that occur to the left and upward in the active document relative to the current position or selection. The action is not applied to matches which overlap the current position or selection. After applies the command action only to matches that occur to the right and downward in the active document relative to the current position or selection. The action is not applied to matches which overlap the current position or selection. It could be that this is not what people expect, which might indicate a design problem. I will have to consider that. The commands do not match “within the part of the document that occurs before or after the caret or selection”; they match within the whole document, accepting only matches which occur entirely before or after the current position or selection. Since the current position in your example is within the matched text, that match is not considered to be “before” the current position.
    • K

      Notepad++ context menu removal

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      0 Votes
      2 Posts
      98 Views
      PeterJonesP
      @KitMcGuire , The User Manual “Right Click Context Menu” (Shell Extension) section at https://npp-user-manual.org/docs/shell-extension/#manual-installation--registration has the instructions on how to “unregister” the DLL that provides that context menu entry
    • Thomas KnoefelT

      [New Plugin] MultiReplace

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      94
      3 Votes
      94 Posts
      101k Views
      guy038G
      Hi, @thomas-knoefel and All, First of all, I’d like to apologize for not congratulating you for this important release, in my previous post ! I confirm that, with your new build, the search does go though all the matches and not only to the first hit of the lines. Nice ! You said in your last post :: A double-click jumps to the hit you click on, and F4 / Shift+F4 go on from there. After a new search, F4 starts with its hits. And in your documentation, you also said : Additionally, three navigation commands are available from the Plugins > MultiReplace menu and can be assigned to custom keyboard shortcuts via Settings > Shortcut Mapper > Plugin Commands: But adding the F4 and Shift + F4 shortcuts for your two commands, Next Search Results and Previous Search Results, via the Shortcut Mapper has the drawback of triggering the message CONFLICT FOUND Could you, like @coises, to insert these shortcuts within your code ? For example, with the Search++ plugin : After you ran the Plugins > Search++ > Search... option, then the Ctrl + F shortcut opens the Search in Files window of the plugin But if you switch back to the current document, a Ctrl + F shortcut opens the usual N++ Find dialog Using this way allows simultaneous shortcuts in both plugin and native N++. No need to use the Shortcut Mapper ! You said : The option is now called “Find All, Replace All, Mark: start at cursor”. A (?) next to it says when it applies … In this new build, I did see the (?) indication which shows the calltip Only when 'Wrap around' is off and not for runs over open documents of files. However, I did not see the new mane of the option Find All, Replace All, Mark: start at cursor but still the old name Find: Search from cursor position Note that I downloaded the MultiReplace-Release-x64.zip archive. I don’t know if this matters ! To my mind, the best is to always check this option in MultiReplace > Settings... > Search and Replace dialog. In this case : When the Wrap around option is not checked, process goes from cursor position to end of file When the Wrap around option is checked, process goes from the beginning of current file to its end You can verify this assumption, using the regex (?s)^xyz.+|^abc.+ against this text : This is a test abc with some text to see xyz if everything works properly Place the caret at beginning of the 5th line to see When the Wrap around option is OFF, a Replace All action, with Notepad++ or MultiReplace, deletes the third last lines ONLY When the Wrap around option is ON, a Replace All action, with Notepad++ or MultiReplace, deletes everything from string abc in 1 replacement This clearly shows that the process goes from the very start of file when the Wrap around option is checked ! If the process would have started from current position, then started again from beginning of file, once the end reached, we shoud have gotten the N++ message : Replace All: 2 occurrences were replaced in entire file ( first, using the (?s)^xyz.+ regex and then, using the (?s)^abc.+ regex ) Best Regards, guy038