Viewing multiple search results at the same time
-
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:
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.
- Run a Find in Files search on your chosen Directory: (tree) with correct Filters: setting; search for
-
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 theFind 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 theFind what:
box ( lower-case letterz
) -
3
Choose yourDirectory
and theFile filters
parameters, which defines a set of files to be scanned -
4
Select theRegular expression
search mode -
5
Click on theFind All
button
-
-
6
Select the left-most tab ( or the only tab ) of theFind result
panel ( theMaster
find result window ) -
7
Right-click inside that window and select theFind in these found results...
option-
8
Specify all your real search parameters, in the new dialog that pops up -
9
Untick theSearch only in found lines
option, ( To do ONCE, only ) -
10
Click on theFind All
button
-
-
11
After the resultingSlave 1
Find result window appears, go back to step6
to perform other searches, on the same set of files and get otherSlave #
Find result window(s) !
Best regards,
guy038
-
-
@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.
-
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 theSlave 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 theFind 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
-
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?
-
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.) -
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”.
-
@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.