Community
    • Login

    Viewing multiple search results at the same time

    Scheduled Pinned Locked Moved General Discussion
    8 Posts 3 Posters 5.7k 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.
    • Alan KilbornA
      Alan Kilborn
      last edited by

      So as somewhat of a N++ “junkie” (understatement?), I also read what is going on on github with Notepad++ development.

      An “issue” recently caught my eye because I have a workaround for it, but it is a good issue so I don’t want to lessen it by posting the following workaround directly on github. But, I thought it might be interesting to discuss it here.

      I’m talking about this issue: Add capability for a second ‘Find result’ window and here is my workaround.

      • Run a Find in Files search on your chosen Directory: (tree) with correct Filters: setting; search for \z and you know what that means: a Search mode = Regular expression
      • You will get a Find result window showing every file in the tree (that matches the Filters, of course); this becomes the “master” Find result window
      • [REPEATABLE STEPS START HERE]
      • Now right-click in the (master) Find result window and choose Find in these found results… (yea, I know, kinda lame verbage)
      • Specify your real search parameters in the dialog box that comes up; IMPORTANT: untick Search only in found lines
      • Run your (real) search by pressing the Find all button
      • Free the resulting (slave) Find result window by double-clicking its title-bar or tab (presumes that you normally work with the default setup where Find result windows get docked at the bottom of the main N++ window)
      • Go back to where it says “REPEATABLE STEPS START HERE” and obviously repeat them to do another search (or two, or three, or…)
        If you’ve done it all correctly, you should have multiple simultaneously seeable Find result windows floating around.

      How this works is related to the search done for the “master”. The search for \z yields exactly one match per file matching the Directory: and Filters: settings. Then the “slave” searches do their work by examining that same fileset – the key thing that makes this work is that there can be as many slaved searches as you need (to view at the same time), off of the one master.

      Here’s a sample after doing the above method on some test data:

      Imgur

      Thinking about it after making that screenshot, it might be better to leave the “master” Find result window docked into the Notepad++ main window; that way it is always super obvious which window is the master.

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

        Hello, @alan-kilborn and All,

        Really clever ! I don’t use the Find result panel very often, but it’ll surely be useful to some people ;-)) The use of \z, to build the set of files, is quite pertinent, as every file ends, at some point, ah ah ;-))

        After testing your work-around, I think that the step, below, is not necessary:

        Free the resulting (slave) Find result window by double-clicking its title-bar or tab

        You just have to select the Master window, first. Then, select the Find in these found results... option, again


        So the road map could be :

        • 1 Perform a Find in Files search ( Ctrl + Shift + F )

          • 2 Type \z in the Find what: box ( lower-case letter z )

          • 3 Choose your Directory and the File filters parameters, which defines a set of files to be scanned

          • 4 Select the Regular expression search mode

          • 5 Click on the Find All button

        • 6 Select the left-most tab ( or the only tab ) of the Find result panel ( the Master find result window )

        • 7 Right-click inside that window and select the Find in these found results... option

          • 8 Specify all your real search parameters, in the new dialog that pops up

          • 9 Untick the Search only in found lines option, ( To do ONCE, only )

          • 10 Click on the Find All button

        • 11 After the resulting Slave 1 Find result window appears, go back to step 6 to perform other searches, on the same set of files and get other Slave # Find result window(s) !

        Best regards,

        guy038

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

          @guy038 said in Viewing multiple search results at the same time:

          Free the resulting (slave) Find result window by double-clicking its title-bar or tab

          On the contrary, I think it is totally necessary, as the whole point is to be able to see and work with multiple slave windows at the same time! If these slave windows stay docked (default behavior), then only one is viewable. Certainly, it could be worked with that way, but I find it much less effective.

          I don’t use the Find result panel very often

          I find this statement from you, a known power-user of Notepad++, to be shocking and amazing. I use a Find result type search way WAY more often than any other kind.

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

            Hi, @alan-kilborn and All,

            Alan, when I said, that one of your steps was not necessary, I just pointed out that, before each new search, we simply have to refer, first, to the Master Find result window and that the fact of undocking the Slave 1 Find result window is not necessary for a correct new search on the whole set of files, previously defined !

            But, of course, once the different searches are performed, all these Slave # Find result windows must be undocked to get a better oversight of your current work !


            Now, regarding my startling assertion about my use of the Find result panel, I have to say that, as long as I don’t have that damn Windows 10 laptop and the ability to decently program, it’s not really essential to me. But I did use the Find in Files dialog when scanning the folder where I keep all my posts to N++ Community users to retrieve some information and sometimes, too, from the folder, where I downloaded the N++ sources of a specific version ;-))

            Best Regards,

            guy038

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

              I had said:

              I use a Find result type search way WAY more often than any other kind.

              After @guy038 's admission that he doesn’t , I got to wondering if my way of searching is “weird” or different from what the vast bulk of other users do.

              To clarify a bit more, I use a Find All in Current Document search WAY more than any other type. So much so that I have set up a Shift+Ctrl+doubleclick word action automatically running this type of search for me.

              So how about it? What do other power-users consider their favorite search methods?

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

                @Alan-Kilborn ,

                My general search technique is to use the standard regex search to find one at a time; I rarely need to see all the matches at once.

                That said, I’m really only a power-user because four years back, I asked a question here, and decided to reciprocate by answering other questions here. I started learning more to be able to answer more questions, and it steamrolled; I never really had super-complex needs out of Notepad++. (My general use case back then was using NppFTP to remote-edit files stored on a Linux box, using my UDL for a custom programming language, with occasionally using column-edit and some simple regex (which I was comfortable with thanks to some familiarity with Perl and using vim when actually logged into the Linux box). Nowadays, outside of the forum, it’s basically the same, but I don’t need NppFTP anymore, because work made the Linux drive available as a \\machinename\ UNC from Windows. Kind of crazy, when I actually think about it, that I’ve stuck around so long.)

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

                  I think we got more of Peter’s “Notepad++ backstory” than specifics on how he works to search data. That’s fine.

                  My own “backstory” is one of needing a lightweight text editor for Perl and Python. But…the bigger backstory is, sadly for me, being sort of bored on my day job. It gave me time to explore other things, and one of those was quirky Notepad++. It really was a sanity saver, filling time; to write little productivity Pythonscripts, to read how others use Notepad++ and how they dealt with its shortcomings, to learn regex (fairly) well, etc. Even though I’m not so bored these days, time still permits for my Notepad++ “indulgence”.

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

                    @Alan-Kilborn said in Viewing multiple search results at the same time:

                    I think we got more of Peter’s “Notepad++ backstory” than specifics on how he works to search data.

                    My first paragraph pretty much covered my search workflow: “My general search technique is to use the standard regex search to find one at a time; I rarely need to see all the matches at once.” But I often onboard new things learned here, so maybe someday “all in file” will enter my NPP workflow. (“Find All” often in my Excel workflow, so I’m actually a bit surprised I don’t use it more in NPP, too.)

                    sadly for me, being sort of bored on my day job. It gave me time to explore … quirky Notepad++. It really was a sanity saver,

                    Understood and agreed. There are definitely times when participating in the questions and problems raised here, and exploring other NPP quirks, help save sanity during the less-fulfilling periods elsewhere.

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