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

Polish existing code navigation gestures #83752

Closed
6 tasks done
jrieken opened this issue Oct 31, 2019 · 7 comments
Closed
6 tasks done

Polish existing code navigation gestures #83752

jrieken opened this issue Oct 31, 2019 · 7 comments
Assignees
Labels
editor-symbols definitions, declarations, references feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes on-testplan
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Oct 31, 2019

Today, we have 'Go to Implementation' and 'Peek References' - the former always defaults to going to an implementation, the latter to always shows peek. We should align those, e.g find references should be able to work like go to commands and go to commands should be able to work like peek references commands. There are more things to be polished, namely:

@jrieken jrieken self-assigned this Oct 31, 2019
@jrieken jrieken added editor-symbols definitions, declarations, references feature-request Request for new features or functionality labels Oct 31, 2019
@jrieken jrieken added this to the November 2019 milestone Oct 31, 2019
@jrieken jrieken changed the title Align Find Implementation and Find References Polish existing code navigation gestures Nov 5, 2019
jrieken added a commit that referenced this issue Nov 5, 2019
jrieken added a commit that referenced this issue Nov 5, 2019
jrieken added a commit that referenced this issue Nov 6, 2019
jrieken added a commit that referenced this issue Nov 6, 2019
@rbuckton
Copy link
Member

rbuckton commented Nov 11, 2019

I can understand always going to a definition if there is only one, but I don't always want to go to a reference. I've often used the "Peek references" (Shift+F12) behavior when writing code as a way to quickly see how an API/interface should be used, but now that this behavior always goes to the reference if there is only a single reference causes issues with my workflow. This is especially disruptive if I have two editors open for the same document in different tab groups, as jumping back in the navigation stack ends up jumping to my previous location in the other tab group, which loses track of the prior position I had open in that tab group.

I think this surfaces two issues:

  1. There does not seem to be a setting/preference to revert to the previous behavior for "Peek references" (there is one for when there are multiple references, but not for a single reference).
  2. The backtracking through the navigation stack is sub-par when you have the same document open in two (or more) tab groups.

@jrieken
Copy link
Member Author

jrieken commented Nov 12, 2019

There does not seem to be a setting/preference to revert to the previous behavior for "Peek references" (there is one for when there are multiple references, but not for a single reference).

The "Peek References" behaviour is still the same as before but we did un-assign its keybinding and now use it for "Go to References". Still, the peek commands are still there and you should be able to tweak the keybindings so that the before-behaviour is back.

The backtracking through the navigation stack is sub-par when you have the same document open in two (or more) tab groups.

I know. Can you please file a separate issue.

@TrevorKarjanis
Copy link

Did this remove "Peek Definition" entirely? I really enjoyed the workflow of Peek Definition > Peek Definition > Peek Definition .... Now it seems I have to Go to Definition > Go Back > Go to Definition > Go Back ... where Go Back is either mouse to keyboard or two clicks through the menu (1.141.0-insider).

@jrieken
Copy link
Member Author

jrieken commented Nov 13, 2019

@TrevorKarjanis We only changed the context menu, the peek-commands are still there and for Peek Definition we also haven't changed the keybinding Alt+F12. Is is that you are so used to running it from the context menu and that you are now missing it from there?

@TrevorKarjanis
Copy link

@jrieken Yes at least within my proficiency, point and clicking the desired symbols and the trivial nature of a right and then left click to select a menu option is quicker than navigating with or to and from the keyboard. Therefore, I used the Peek Definition context menu option to familiarize or refresh my memory on any number of definitions while formulating implementation on the current page.

I guess if this change remains I can learn Alt + F12, set an easier binding, or investigate creating an extension to add it back.

@jrieken
Copy link
Member Author

jrieken commented Nov 13, 2019

I take the feedback - the goal was to clean-up and streamline the context menu but not to annoy users. Not sure what we will end up doing. Ideally, we have user-configurable menus but that's another (big) issue

@TrevorKarjanis
Copy link

@jrieken I've been using Alt + F12 today, and I've found it completely adequate. Thank you!

@jrieken jrieken added on-testplan on-release-notes Issue/pull request mentioned in release notes labels Dec 2, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-symbols definitions, declarations, references feature-request Request for new features or functionality on-release-notes Issue/pull request mentioned in release notes on-testplan
Projects
None yet
Development

No branches or pull requests

3 participants