Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search in all opened files #41

Open
olegpelipenko opened this issue Aug 14, 2018 · 8 comments
Open

Search in all opened files #41

olegpelipenko opened this issue Aug 14, 2018 · 8 comments
Assignees
Milestone

Comments

@olegpelipenko
Copy link

It is not an issue, looks more like feature request. There is a feature in notepad++ that missing in klogg: search in multiple files.
I think that most convenient way to show results - is to show all results in one window.

@variar
Copy link
Owner

variar commented Feb 14, 2019

The same as nickbnf#137

@variar variar self-assigned this Oct 13, 2020
@variar variar added this to the 2020.next milestone Oct 13, 2020
@variar
Copy link
Owner

variar commented Aug 26, 2021

@janafrank, copied from #390

For when you need to perform the same search on many files. Just a simple option to 'Search all open files' that will save users from all that extra clicking c:

This could be triggered, for example, by holding Shift while pressing the search button (can be mentioned in the tooltip)

.

@janafrank
Copy link

I was talking about a simpler feature that might be easier to implement: an option to perform the same search in each open file. So the outputs are not combined, it's just a helpful automation. The result is identical to manually performing search in each open file.

But a search through all open files similar to notepad++ would be a great thing to have indeed. The challenge here is to think of a good way of displaying the combined results in the UI.

@jeffjensen
Copy link

Great search ideas, both of them!

  • "Search in all files with independent results": I regularly paste the same search text in multiple tabs, so this is a little time-saver.
  • "Search in all files with combined results": I also could use this feature. I suggest a new tab opens with the results similar to how pasting clipboard opens a new tab. This could allow the user to save the combined results as a file, too.
    Line ordering is a concern to resolve - sequential appending, interwoven somehow, etc. I'd want mine sorted by the first N columns as they represent a date/time stamp, but not all files have that so need a "sort resulting lines" option for this search feature.

@janafrank
Copy link

janafrank commented Aug 26, 2021

Line ordering is a concern to resolve - sequential appending, interwoven somehow, etc. I'd want mine sorted by the first N columns as they represent a date/time stamp, but not all files have that so need a "sort resulting lines" option for this search feature.

Sorting by columns might be a little out of scope for klogg.

Check out how the notepad++ handles 'search in all open files', I think it's a good overall model since it shares some of the important concepts with klogg (regex, bottom panel, line numbers, highlighting).

@variar
Copy link
Owner

variar commented Aug 27, 2021

Yes, I'm thinking of something like Notepad++. However, a bottom panel with merged search results will be hard to implement in current klogg architecture. Separate tab might be easier.

@jpsv
Copy link

jpsv commented Nov 8, 2021

I'd also like to see this feature implemented, it's one of the most useful features we could have. I think having a side pane in the bottom half where each file with hits is listed could work:

file_1.txt (4)  | As-is results window on the right                   |
file_2.txt (9) >| As-is results window on the right                   |
file_3.txt (12) | As-is results window on the right                   |

A file browser tree navigator on the top half and Shift+Clicking "Search" can search through the opened files while Ctrl+Shift+Clicking "Search" could search through the current file's CWD without having to manually select/open the files you want to search through.

@variar variar modified the milestones: 2023.next, 2024.next Jul 1, 2023
@BharathMeduri
Copy link

I hope this feature gets added , It will be really useful to search a pattern across different files as usually a pattern runs over different times in a day and gets captured in different files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants