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

Improve Files view to allow content-per-file #469

Open
jez9999 opened this issue Apr 4, 2024 · 4 comments
Open

Improve Files view to allow content-per-file #469

jez9999 opened this issue Apr 4, 2024 · 4 comments

Comments

@jez9999
Copy link

jez9999 commented Apr 4, 2024

It would be nice to be able to see a list of the files where grep has matched content, then click on the entry in the files list and see a side-pane or something listing the matches for that file (line and text), rather than just having all matches together with the Content view. Could we add that UI?

@lifenjoiner
Copy link
Collaborator

Configure your own Settings --> Editor, and then you can double click the file in result list to open it using that editor.

I think it is a better solution:

  1. configurable
  2. reduced the burden of Dev to maintain an internal editor component

@jez9999
Copy link
Author

jez9999 commented Apr 5, 2024

That would just open the file in the editor without highlighting the matches for that file, rather defeating the purpose.

@TooMuchBlue
Copy link

I think this could work better without creating a new view.

  • If you have something selected in Files view and switch to Content view, it should automatically scroll to the first item from that file and select it.
  • It could also work in reverse: if a Content row is selected, switching to Files should scroll to and select the file.
  • If multiple lines are selected on either side, I suggest using the first selected item to keep it simple.

I never thought about it before, but it is kind of annoying that switching views always jumps back to the top of the list -- might as well keep their place in the list if possible. This might be good as a feature that can be turned on and off in case not everybody agrees -- but then again, getting to the top or bottom of the list is not terribly hard using Home or End.

Follow-on request for us keyboard junkies: an easy keystroke to toggle between Files and Content view. Suggested candidates: Shift-Enter, numpad-plus, back-tick, backslash.

@lifenjoiner
Copy link
Collaborator

@jez9999

defeating the purpose

grepWin is neither an editor nor a reader.
Now, we have %column% together with %line% for external editors, which will help to locate the position. Highlight marking is fancy, but not essential, comparing to syntax highlighting.
I can feel your eager of feature request. In fact, it's always easier said than done. Hoping there would be elegant solutions, but no promises.

@TooMuchBlue

us keyboard junkies

Taste quick locating immediately: typing the file name in the list view works, like in Explorer.

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

No branches or pull requests

3 participants