grepWin icon indicating copy to clipboard operation
grepWin copied to clipboard

Improve Files view to allow content-per-file

Open jez9999 opened this issue 1 year ago • 4 comments

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?

jez9999 avatar Apr 04 '24 13:04 jez9999

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

lifenjoiner avatar Apr 05 '24 00:04 lifenjoiner

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

jez9999 avatar Apr 05 '24 10:04 jez9999

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.

TooMuchBlue avatar Aug 01 '24 21:08 TooMuchBlue

@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.

lifenjoiner avatar Aug 02 '24 03:08 lifenjoiner