Ability to navigate to exact search result instance
Check for existing issues
- [X] Completed
Describe the feature
- When you search for an item. You are not able to navigate to exact search instance. If you click on the file name in the search result it takes you to the file but not to the exact search instance
- You should be able to click on the instance found in the search result and navigate to the exact line where the result was found
While less discoverable compared to the "file name", all other separators are clickable too:
as well as the navigate arrow in the gutter:
also, "file name" per se hints the same shortcut (alt-enter) by default:
which works in any place inside of the search results — if one places the caret and presses the shortcut, the whole file will be opened at this position.
So, functionality-wise, Zed seems to support what's being requested, it's the learning path/discoverability that's not well. Not sure what to do about this, but maybe somebody else has ideas?
While less discoverable compared to the "file name", all other separators are clickable too:
as well as the navigate arrow in the gutter:
also, "file name" per se hints the same shortcut (alt-enter) by default:
which works in any place inside of the search results — if one places the caret and presses the shortcut, the whole file will be opened at this position.
So, functionality-wise, Zed seems to support what's being requested, it's the learning path/discoverability that's not well. Not sure what to do about this, but maybe somebody else has ideas?
It would be awesome if one could do option + click or just click on the the highlighted instance to directly navigate there.
+1 to this issue; it took me searching for this issue to figure out the functionality exists :joy: . Two suggestions, both of which can be independently implemented:
- Clicking line numbers takes you to the file at that line. This is what GitHub code search does. Right now clicking line numbers just selects the line which is reasonable functionality to lose in the search view.
- Ctrl/Option + hover changes cursor to clickable and on click navigates to the file
I do think it's useful to not have click directly take you to it so that you can directly edit or copy from search results.


