Sort Find in Files results, or open multiple files from there

I do a search for something, I get a list of files that term is in, I need to open many files from the list, but I can only open 1 at a time, and doing the search again shows the files in random order, so it's difficult to hunt and peck for unopened files.

I see no option for sorting the list by file, nor any way to open multiple files at once.

What's the solution here? Is this a missing feature, or is there some purposeful reason this is so limited?

4
4 comments

Hi there,

1) If you look at how "Find in Files" works / evolved for the last 6 or so years, you would agree with me that it is just a preview of the full search (with a quick edit facility for small edits). The full search is done only after clicking the button at the bottom:

  • Search is done in multiple threads to find anything as fast as possible -- hence the different order on each invocation.
  • No sorting: it shows TOP 100 matches only (which you can increase but still)

To have what you need (to a some degree) just use "Open in Find Window" button in the bottom right of the Find in Files popup and it will list ALL matches in a standard separate tool window where you will have A-Z order, grouping options. Quick edit panel is also available.

2) To open multiple files at once -- just select them there (Ctrl+Click works fine here on Windows) and hit Enter.

 

Can also check my comments in https://youtrack.jetbrains.com/issue/IDEA-282541 and https://youtrack.jetbrains.com/issue/WI-56052 (older ticket, short comment)

 

Other related tickets (mentioning just a few: you can search for more on IDEA project):

4

> If you look at how "Find in Files" works / evolved for the last 6 or so years

I don't know how I would have done that 😆 Sorry that I'm as familiar with 6 years of "Find in Files" evolution as you are. Maybe that's not something that would occur to a normal PHPStorm user, nor be easy to figure out how to do well; I wouldn't expect that from anyone to begin with anyway.

> it is just a preview of the full search

That's fine but appears to be completely irrelevant to having a sorted list (even just the first 100 sorted results, which I know is doable, it's like showing paginated results on a webpage or from a SQL query), or letting me select multiple files to open without having to re-do the search and get randomly-sorted results (very easy to open the same file or difficult to try to figure out which ones you still need to open).

> Search is done in multiple threads to find anything as fast as possible

OK, so we should have an option to wait for sorted results... even if that means seeing a warning blurb.

"Open in Find Window" I guess does what I need... though it's more cumbersome. Thankfully I don't need to open a lot of files from a search concurrently. I'm not sure what you mean by "Quick edit panel".

Thanks for the info.

0

I'm not sure what you mean by "Quick edit panel".

The same the you have in the Find in Files popup -- ability to edit the file right there without opening the actual file in the Editor.

0

The Quick Edit Panel is nice for quick edits... not when you need to work with files in a broader context. That's why there should be some form of sorting; if the piecemeal fetching of results interferes with that, then we should have an option to wait, or something sensible. Showing randomly-ordered results, with no ability to multi-open files, is cumbersome and difficult, completely avoidable, and makes JetBrains look bad.

0

Please sign in to leave a comment.