Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Feature: Go to symbol definition within file context in PRs #624

Open
mjaniszew opened this issue Mar 27, 2016 · 5 comments
Open

Feature: Go to symbol definition within file context in PRs #624

mjaniszew opened this issue Mar 27, 2016 · 5 comments

Comments

@mjaniszew
Copy link

Message sent to GitHub:

Recently when I'm doing code reviews, I'm really missing possibility to easily jump to function/variable definition. It would be great to have something similar to functionality available eg. in Jet Brains products, where I can hold Ctrl/Cmd and then click eg. on variable in code, and I'll be taken straight to this variable's definition, and be able to quickly see what it actually does. Instead I need to use browser's built in search which is uncomfortable and very often distracting when it finds something from totally different context.

Here's more detailed example:
https://www.jetbrains.com/help/phpstorm/2016.1/navigating-to-declaration-or-type-declaration-of-a-symbol.html?origin=old_help

While I'm fully aware that it's not an easy task, especially to cover all the languages, it would be really great to have at least basic implementation of this, and be able to easily jump to function / variable definition only within file context. It doesn't mean that it's needed to implement some advanced IDE functionalities. What most people would probably expect is: in Pull Request, while doing code review, when I'm reviewing file1.js and I click with Cmd/Ctrl pressed on myFunction(), I expect browser to scroll to definition of myFunction in file1.js and mark it to be better visible until I click somewhere else. If the definition is not visible in file diff (full file is not visible), then diff might get expanded, or simply open full file in new tab and scroll to definition there, which is probably easier to implement.

Response:

Hi Michal,

Thanks for the suggestion! I'll certainly pass it along to the team. I can't promise if/when we might implement that, however your feedback has definitely been recorded.

Let us know if you have any other questions!

@syndbg
Copy link

syndbg commented Mar 29, 2016

Just wondering, how did you contact Github regarding the feature request?

@mjaniszew
Copy link
Author

I've simply sent an email to support@github.com with proper description.

@cirosantilli
Copy link
Collaborator

Same for file browsing: #292

@capablemonkey
Copy link

Hey folks, I had the exact same thought. I hacked up a little chrome extension to do this: https://github.com/capablemonkey/github-go-to-definition

@cirosantilli
Copy link
Collaborator

It has been implemented for file browsing at least: #292 !!!!

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

No branches or pull requests

4 participants