Skip to content

Focus peek window on creation #23001

Closed

Description

@johnfn

I love the peek window. It's pretty much the best thing ever.

I would love it ever so slightly more if VSCode would auto-focus it and insert the cursor where it belongs. e.g. if I clicked "peek definition", the cursor should be on the definition of what I peeked.

This idea seems so obvious I can't believe it's not part of the default implementation, but I know you guys have your reasons for doing things. 😄

If there is such a reason, could this at least be made a setting?

Thanks guys! ❤️

Activity

  1. added
    editor-contrib
    feature-request
    on Mar 23, 2017
  2. jrieken commented on Mar 23, 2017

    @jrieken
    Contributor

    Fiar request. The reasoning for focusing the tree of the left that you might wanna quickly skim through all references/definitions/etc to get fast overview. That's also the reason for changing the peek editor when the focus changes in the list.

    We could add a command that allows to toggle between the selected reference/def and the peek view and then remember where you have been last

  3. johnfn commented on Mar 23, 2017

    @johnfn
    ContributorAuthor

    Ah, I understand. Speaking to my own use case, I use peek definition at least 98% of the time that I use the peek window, so at least 98% of the time there's only one file in the tree, and highlighting the tree doesn't make much sense. (I think it's a bit of a UX problem with the "peek all references" - it feels a little too much information in too constrained a space, so I normally do a global search instead - but that's an alternate request.)

    Your toggle command sounds great to me.

    I would also love if there was a keyboard shortcut to focus back on the original text document.

  4. added
    help wanted
    on Apr 11, 2017
  5. frabbit commented on Aug 18, 2017

    @frabbit

    maybe the focus should be on the peek editor directly if there is only one entry in the list, that would be very helpful.

  6. idealatom commented on Jul 18, 2018

    @idealatom

    Is there any progress being made on this?

  7. ognjenio commented on Nov 11, 2018

    @ognjenio

    Not entirely sure whether it's appropriate to add this here, but I'd also suggest two other things for the peek window that're in the same vein:

    1. Splitting the "Keep peek editors open even when double clicking their content or when hitting escape" into two. The two aren't really equivalent, especially since double-clicking selects entire words and I'd for example like to be able to that, but still be able to close the window with Esc.

    2. I'd suggest changing the tab order of the peek window for the editor to follow the list. That way, when the peek window is opened you can select the appropriate file and Tab into it instead of Shift+Tabbing.

  8. added
    editor-symbols
    and removed
    editor-contrib
    on Oct 8, 2019
  9. the-nurk commented on Nov 24, 2019

    @the-nurk

    Any push on this? this is a must have. I seriously don't know how people have gone without this.

  10. jrieken commented on Nov 25, 2019

    @jrieken
    Contributor

    @nicksettoon This is an open source project, this issue is marked as 'help wanted', so how about you?

  11. GustavoASC commented on Nov 26, 2019

    @GustavoASC
    Contributor

    Johannes Rieken (@jrieken) I'll give it a try, looking for a way to automatically focus on peek window when there is only one entry in the list, according to Heinz Hölzer (@frabbit) suggestion.

    Do you guys think it's a good solution?

  12. jrieken commented on Nov 27, 2019

    @jrieken
    Contributor

    I'd say a command to move focus between them and then a setting to define is focused by default is the better solution. That makes the behaviour predictable, e.g I often press Enter when having just one reference I wouldn't want a new line then

  13. 1 remaining item

  14. GustavoASC commented on Dec 1, 2019

    @GustavoASC
    Contributor

    Besides, we still need a setting to define which component will receive focus by default when Peek Window is shown.

  15. the-nurk commented on Dec 22, 2019

    @the-nurk

    @nicksettoon This is an open source project, this issue is marked as 'help wanted', so how about you?

    Johannes Rieken (@jrieken) Sorry. I'm so far away from having time to learn how to contribute. I'd like to, but I'm still in college working on several other things at the moment. Also, wouldn't even know where to start learning how to build vscode extensions and stuff.

  16. tanglei1994 commented on Jan 20, 2020

    @tanglei1994
  17. jrieken commented on Jan 23, 2020

    @jrieken
    Contributor

    fyi - I have change the setting to: peekWidgetDefaultFocus?: 'tree' | 'editor';

  18. added
    on-release-notes
    on Jan 30, 2020
  19. locked and limited conversation to collaborators on Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

editor-symbolsfeature-requesthelp wantedon-release-noteson-testplan

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions