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

x/tools/cmd/godoc: add "jump to identifier" dialog via F keyboard shortcut, like on godoc.org #27714

Open
dmitshur opened this Issue Sep 17, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@dmitshur
Member

dmitshur commented Sep 17, 2018

https://godoc.org has a "jump to identifier" dialog that can be brought up via the F keyboard shortcut on any package documentation page. It looks like this:

I find it immensely useful for rapidly navigating documentation of Go packages, and most people who know about it seem to find it very useful too. Its largest downfall is the poor discoverability, with many people not knowing that the F keyboard shortcut exists, and this is something that can be improved.

In order to bring more uniformity to the various godoc web UIs and the experiences they offer, I propose we backport this functionality so that it's available within x/tools/cmd/godoc as well.

This is related to #26637 in that it's a mechanism that addresses the same problem of poor navigation within a package, albeit in a different way.

@dmitshur

This comment has been minimized.

Member

dmitshur commented Sep 17, 2018

Here's a 24-second video to demonstrate the workflow and navigation speed possible with the "jump to identifier" dialog. In the video, I open the docs for net/http package and visit, in order, the following 4 definitions:

  1. http.FileSystem interface
  2. Do method of http.Client struct
  3. http.RoundTripper interface
  4. http.Flusher interface

Video

Note there are no false positives that would be happen if I tried to rely on the browser's search functionality, which is susceptible to finding mentions of an identifier within doc strings of other identifiers.

@rsc

This comment has been minimized.

Contributor

rsc commented Sep 19, 2018

This sounds fine.

@rsc rsc changed the title from proposal: x/tools/cmd/godoc: add "jump to identifier" dialog via F keyboard shortcut, like on godoc.org to x/tools/cmd/godoc: add "jump to identifier" dialog via F keyboard shortcut, like on godoc.org Sep 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment