Skip to content

Polish existing code navigation gestures #83752

Closed

Description

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:

Activity

  1. added
    editor-symbols
    feature-request
    on Oct 31, 2019
  2. changed the title [-]Align Find Implementation and Find References[/-] [+]Polish existing code navigation gestures[/+] on Nov 5, 2019
  3. rbuckton commented on Nov 11, 2019

    @rbuckton
    Contributor

    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.
  4. jrieken commented on Nov 12, 2019

    @jrieken
    ContributorAuthor

    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.

  5. TrevorKarjanis commented on Nov 12, 2019

    @TrevorKarjanis

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

  6. jrieken commented on Nov 13, 2019

    @jrieken
    ContributorAuthor

    Trevor Karjanis (@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?

  7. TrevorKarjanis commented on Nov 13, 2019

    @TrevorKarjanis

    Johannes Rieken (@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.

  8. jrieken commented on Nov 13, 2019

    @jrieken
    ContributorAuthor

    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

  9. TrevorKarjanis commented on Nov 13, 2019

    @TrevorKarjanis

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

  10. added
    on-release-notes
    on Dec 2, 2019
  11. locked and limited conversation to collaborators on Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

editor-symbolsfeature-requeston-release-noteson-testplan

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions