Community
    • Login

    How Do I Delete Search Entries?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    36 Posts 9 Posters 25.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • glennfromiowaG
      glennfromiowa @guy038
      last edited by

      @guy038 said:

      In addition, I build my own regexes, either for improving my knowledge about regular expressions or for specific tasks. Keeping a list of all of them doesn’t seem pertinent !

      Guy, I agree with you that keeping a list of all RegExes would be overwhelming and not much use. I do, however, keep a list of RegEx expressions that have been particularly helpful or I’ve spent a lot of time figuring out (sometimes many hours!). Even those are hard to organize, but I just keep them in a text file, rather than trying to retrieve them within N++ settings. And you’re right, if nothing else, I often modify them even when I look them up to reuse them, but at least I have a starting point. Of course, your skill level with RegExes is exponentially higher than mine, but for us ordinary folk, it’s helpful to have somewhere to start. :) I’ve also started using the spaced, commented format you recommended in this post!

      One thing that may assist with retrieving previously-used RegEx strings from the Find or Replace box is to use the scroll wheel on the mouse while that box has the focus. I’ve noticed if you just use the drop-down box, it displays up to 30 rows, and you can’t select any string further back than that. However, if you use the scroll wheel, it can access much more than that. I tested up to 56 rows and then stopped, so I’m not sure what the upper limit is - not considering what is saved when exiting the program and re-opening, just what is available while the program is open. It appears you can access further back by selecting the last item from the drop-down list, then, without doing a find or replace, re-open the drop-down list, which will show the next 30 items. However, once you’ve gotten further down the list, you can only go higher on the list by using the scroll wheel or doing a find to reset the drop-down box. Hope this helps someone!

      1 Reply Last reply Reply Quote 3
      • Xiucai HualingsonX
        Xiucai Hualingson
        last edited by

        Yes, it is so burdensome.
        We must close notepad++, then delete search history in config.xml within anther text editor and save it, then reopen notepadd++.
        If one directly open config.xml and modify it within notepad++, it does not work, because notepad++ does not reload configurations and will rewrite config.xml using its cached data in memory when it quits.

        1 Reply Last reply Reply Quote 0
        • PeterJonesP
          PeterJones @Troglo37
          last edited by

          @Troglo37 ,

          I said in How Do I Keep Multiple Tabs Saved in Notepad++?:

          I just poked that issue#2931: Scott, who you were talking with in that other topic from 2017, is now on the dev team, and I thought he might find it interesting to revisit the workaround he did 4 years ago and put it into the actual codebase.

          Scott replied in the issue: he actually incorporated that change in v7.9.3, so the delete key removes the current entry from the search history.

          Troglo37T 1 Reply Last reply Reply Quote 0
          • Troglo37T
            Troglo37 @PeterJones
            last edited by

            @PeterJones said in How Do I Delete Search Entries?:

            @Troglo37 ,

            I said in How Do I Keep Multiple Tabs Saved in Notepad++?:

            I just poked that issue#2931: Scott, who you were talking with in that other topic from 2017, is now on the dev team, and I thought he might find it interesting to revisit the workaround he did 4 years ago and put it into the actual codebase.

            Scott replied in the issue: he actually incorporated that change in v7.9.3, so the delete key removes the current entry from the search history.

            Thanks! It works! Now the next thing is to have the number of entries that are saved after closing N++ be increased to at least 20. What is the best way to submit that request?

            Troglo37T 1 Reply Last reply Reply Quote 0
            • Troglo37T
              Troglo37 @Troglo37
              last edited by

              @PeterJones I just checked my email and saw the links to the post I made regarding increasing the number of saved entries because you posted about deleting the entries. It’s been a while and I forgot where I posted it and assumed the issue was buried.

              I see that the issue is still open and a couple of people have commented on it, as late as 2020. What’s the best way to handle this? Should I go back to that open request and ask again or is there another way to deal with this?

              Alan KilbornA 1 Reply Last reply Reply Quote 0
              • Alan KilbornA
                Alan Kilborn @Troglo37
                last edited by

                @Troglo37

                It is confusing when you say “saw links to the post I made…” and then don’t tell us what link you are talking about. How are we supposed to know?

                But I went “above and beyond” and I think I found what you are talking about, am I right?:

                https://github.com/notepad-plus-plus/notepad-plus-plus/issues/2944

                1 Reply Last reply Reply Quote 0
                • Alan KilbornA
                  Alan Kilborn
                  last edited by

                  @Troglo37

                  You asked for 100 (or more) entries in the find history.

                  The developers, prior to your request, had implemented a way to get 30, which is a 3x “improvement” over the standard 10.
                  Now, while the method for obtaining 30 is a bit strange (editing config.xml with Notepad++ not running), I tested it in the 8.0RC version and it does work to retain 30.

                  Probably the developers think 30 is enough?
                  I agree that is enough.
                  Any more than that, you’d spend more time trying to look through all of the entries in order to find what you want, rather than just entering it fresh.

                  I have no insight as to why the devs left your issue open if they think 30 is a good limit. But, it joins many other issues that are left open as well!

                  Troglo37T 1 Reply Last reply Reply Quote 1
                  • EkopalypseE
                    Ekopalypse
                    last edited by

                    @Alan-Kilborn said in How Do I Delete Search Entries?:

                    I have no insight as to why the devs left your issue open

                    :-D so that they continue to have something to do? :-D

                    1 Reply Last reply Reply Quote 1
                    • Troglo37T
                      Troglo37 @Alan Kilborn
                      last edited by

                      @Alan-Kilborn said in How Do I Delete Search Entries?:

                      @Troglo37

                      You asked for 100 (or more) entries in the find history.

                      The developers, prior to your request, had implemented a way to get 30, which is a 3x “improvement” over the standard 10.
                      Now, while the method for obtaining 30 is a bit strange (editing config.xml with Notepad++ not running), I tested it in the 8.0RC version and it does work to retain 30.

                      Probably the developers think 30 is enough?
                      I agree that is enough.
                      Any more than that, you’d spend more time trying to look through all of the entries in order to find what you want, rather than just entering it fresh.

                      I have no insight as to why the devs left your issue open if they think 30 is a good limit. But, it joins many other issues that are left open as well!

                      Are you saying that now 30 entries can be saved? If so, how do I enable that?

                      PeterJonesP 1 Reply Last reply Reply Quote 0
                      • PeterJonesP
                        PeterJones @Troglo37
                        last edited by PeterJones

                        @Troglo37 ,

                        This was described for you in your issue#2944 (admittedly almost a year later, so you might not have noticed, though GitHub should have notified you of the reply).

                        You have to edit config.xml and change nbMaxFindHistoryFind="10" to nbMaxFindHistoryFind="30". (You cannot go higher than 30.) Note: when manually editing config files, you have to follow the “Editing Configuration Files” description in the npp-user-manual.org/docs/config-files/ – if you don’t follow that procedure, Notepad++ might overwrite your changes to config.xml when it closes.

                        Note that the nbMaxFindHistoryFind setting has existed since 2009 – so it definitely was available when you asked your question in 2017. Though they did fix a bug in v7.8.7 (Apr 2020) where before, if you set nbMaxFindHistoryFind > 30, it would erase your whole history; now it just leaves the history limit to 30 even if you try to set it higher.

                        That setting needs to be described in the “Preferences for Advanced Users” section. I created usermanual issue#241.

                        PeterJonesP 1 Reply Last reply Reply Quote 1
                        • PeterJonesP
                          PeterJones @PeterJones
                          last edited by PeterJones

                          @Troglo37 ,

                          Correction to what I said earlier: The config.xml file can be overwritten by Notepad++ on exit, even if you follow the procedure I linked, so that sequence won’t reliably work for config.xml. To edit config.xml, close all instances of Notepad++; edit config.xml in some other editor (like Windows’ builtin notepad.exe) and save; reload Notepad++ and the changes should take effect.

                          Troglo37T 1 Reply Last reply Reply Quote 0
                          • Troglo37T
                            Troglo37 @PeterJones
                            last edited by

                            @PeterJones I have to leave now. I’ll be gone most of the day. When I get back, I’ll follow your instructions and let you know if I was successful with it or not.

                            1 Reply Last reply Reply Quote 0
                            • Troglo37T
                              Troglo37
                              last edited by

                              @PeterJones said in How Do I Delete Search Entries?:

                              nbMaxFindHistoryFind=“10”

                              Should I change nbMaxFindHistoryPath=“10”, nbMaxFindHistoryFilter=“10” and nbMaxFindHistoryReplace=“10” all to 30 too?

                              It seems as though they should be changed too, but I dare not do so unless you tell me to do so.

                              PeterJonesP 1 Reply Last reply Reply Quote 0
                              • PeterJonesP
                                PeterJones @Troglo37
                                last edited by

                                @Troglo37 said in How Do I Delete Search Entries?:

                                It seems as though they should be changed too

                                Those are editable as well. (You could have found that out by looking at my issue#241 linked above, which has the description that will hopefully be in the next version of the online usermanual.)

                                Whether or not you should depends on whether you desire the “replace” , “filters”, and “directory” boxes to have a longer history as well. All have the same restriction of a value up to 30.

                                but I dare not do so unless you tell me to do so.

                                I cannot tell whether that was serious – in which case, wow, calm down, the only thing that could go wrong is you’d lose some regex history – or sarcasm – in which case, wow, calm down, I’ve never claimed to be the arbiter of what you should or should not do with Notepad++. I’m just trying to be helpful.

                                Alan KilbornA 1 Reply Last reply Reply Quote 0
                                • Alan KilbornA
                                  Alan Kilborn @PeterJones
                                  last edited by

                                  @PeterJones said in How Do I Delete Search Entries?:

                                  the only thing that could go wrong is you’d lose some regex history

                                  Is that even true?
                                  I know there was an old bug with that, but I thought it got fixed.

                                  Should I change nbMaxFindHistoryPath=“10”, nbMaxFindHistoryFilter=“10” and nbMaxFindHistoryReplace=“10” all to 30 too?

                                  I think even if you set them all to 99, each one individually should get set to its maximum when you next exit Notepad++ (and config.xml gets rewritten).

                                  (I really really think too much time and effort has gone into discussing this. I hope it is over. Whew!)

                                  Troglo37T PeterJonesP 2 Replies Last reply Reply Quote 0
                                  • Troglo37T
                                    Troglo37 @Alan Kilborn
                                    last edited by

                                    @PeterJones I wasn’t being sarcastic and it wasn’t meant as a slight toward you. I meant it as I wouldn’t take the chance of changing something that you didn’t say to change for fear it might have unintended consequences.

                                    It’s already evident I’m not well-versed in N++ and defer to someone with much greater knowledge than I.

                                    @Alan-Kilborn I’m aware that the max is 30. The issue was whether or not to change the other 3 entries I asked about to 30.

                                    1 Reply Last reply Reply Quote 0
                                    • PeterJonesP
                                      PeterJones @Alan Kilborn
                                      last edited by

                                      @Alan-Kilborn said in How Do I Delete Search Entries?:

                                      @PeterJones said in How Do I Delete Search Entries?:

                                      the only thing that could go wrong is you’d lose some regex history
                                      Is that even true?
                                      I know there was an old bug with that, but I thought it got fixed.

                                      It could be set to 0, which still clears the history (understandably, since you told it you want a 0-length history).
                                      (yes,

                                      I hope it is over.

                                      Sorry, you asked, I had to answer. ;-)

                                      1 Reply Last reply Reply Quote 0
                                      • Troglo37T
                                        Troglo37
                                        last edited by

                                        I went ahead and enabled all of the entries to 30. I added 30 entries, closed and reopened N++ and so far all seems to be working properly.

                                        P.S. I have no idea what the 3 entries (nbMaxFindHistoryPath=“10”, nbMaxFindHistoryFilter=“10” and nbMaxFindHistoryReplace=“10” NOW “30”) do. I just assume by looking at what’s written in the code that they’re related and possibly should match nbMaxFindHistoryFind=“30”.

                                        1 Reply Last reply Reply Quote 0
                                        • guy038G
                                          guy038
                                          last edited by guy038

                                          Hello, @troglo37, @peterjones, @alan-kilborn, @ekopalypse and All,

                                          @troglo37 :

                                          Well, you could have guessed, with a bit of deduction, even if not aware about technical matters !!

                                          • Firstly, look at the four main fields of the Find in Files dialog ( Ctrl + Shift + F ):

                                            • Find what:

                                            • Replace with:

                                            • Filters:

                                            • Directory:

                                          • Secondly, look at the first 4 attributes of the <FindHistory •••••••••••••••> tag :

                                            • nbMaxFindHistoryPath

                                            • nbMaxFindHistoryFilter

                                            • nbMaxFindHistoryFind

                                            • nbMaxFindHistoryReplace

                                          Isn’t it obvious ?


                                          Still confused ?

                                          • Then, let’s re-organize these four attributes, like below :

                                            • nbMaxFindHistoryFind

                                            • nbMaxFindHistoryReplace

                                            • nbMaxFindHistoryFilter

                                            • nbMaxFindHistoryPath

                                          I hope you get it :-))

                                          Best Regards,

                                          guy038

                                          Alan KilbornA 1 Reply Last reply Reply Quote 3
                                          • Alan KilbornA
                                            Alan Kilborn @guy038
                                            last edited by

                                            This post is deleted!
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            The Community of users of the Notepad++ text editor.
                                            Powered by NodeBB | Contributors