Search in all opened files
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.
The same as nickbnf/glogg#137
@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)
.
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.
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.
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).
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.
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.
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