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

Whole-file preview #439

Open
Jackenmen opened this issue Nov 23, 2022 · 1 comment
Open

Whole-file preview #439

Jackenmen opened this issue Nov 23, 2022 · 1 comment
Labels
P: maybe Pending approval of low priority request. T: feature Feature.

Comments

@Jackenmen
Copy link

Have you considered adding a whole-file preview to this application? In the past when I was using Windows as my main OS, I was using dnGrep as a GUI for grep-like searching and one very cool feature that I couldn't really find in any alternative that's available for Linux is the whole-file preview.

In dnGrep, on the bottom left side of the window, there's a list of all search matches. They are grouped by file, and for each match, a few lines of context are shown around it. Additionally, you can also see a whole-file preview on the right side of the window.
image

I personally found that having these preview features made me want to use the GUI more often than CLI where I would only get a hard-to-digest long list of matched lines, at best with few context lines around it if I used -A or -B option with it.

@gir-bot gir-bot added the S: triage Issue needs triage. label Nov 23, 2022
@facelessuser
Copy link
Owner

I've considered it before, at least to some extent, but it's never been a dire need for me. If I want to get context, I usually double-click the entry and it opens in my editor quite fast. We already do things like truncate lines if they are very long to limit how much content we are storing in memory, and while there is some logic in the core that allows for capturing more context, I ended up not using it in order to store less and not waste time acquiring additional lines of context. Python is not the fastest language, so the less we do, the quicker things go.

Could we allow a quick preview directly within Rummage? Maybe. If we kept the line info around (like where lines end) I could see maybe a shortcut to preview a line with more context where we dynamically seek the lines and display them on demand. The same could be done for a full preview. As we already have all the info related to where the matches are, we could, on-demand load up a view of a file's content and highlight the matches.

It's something to think about at least assuming I had the time to dig into it. FWIW, Rummage generally provides enough for me to be productive, but that doesn't mean there isn't room for improvement. While I can't promise we'll implement this feature, if I have time, I may look into what's possible in the future.

@facelessuser facelessuser added P: maybe Pending approval of low priority request. T: feature Feature. and removed S: triage Issue needs triage. labels Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: maybe Pending approval of low priority request. T: feature Feature.
Projects
None yet
Development

No branches or pull requests

3 participants