Vim: Show hover ('gh') steals focus

Created on 16 May 2017  路  12Comments  路  Source: VSCodeVim/Vim

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


BUG REPORT:

Environment:

  • VSCode Version: 1.12.1, current insiders
  • VsCodeVim Version: 0.7.1
  • OS: Win10

What happened:

Typing gh, ie, 'show hover', will show hover information for supported languages. However, the hover steals focus and you need to hit escape. Since the hover accepts no input I would expect jk to continue working as expected / possibly dismiss the hover.

What did you expect to happen:

Hover does not steal focus.

How to reproduce it:

Type 'gh' in command mode over a symbol for a supported language. Type j, notice nothing happens.

kinenhancement

Most helpful comment

I can confirm that the issue has been fixed - should the GH issue be closed?

All 12 comments

I think you mean gh?

Definitely a valid bug though!

Yep! Thanks

Sometimes, usually in angular typescript files, intellisense is just really eager to show me things and has gotten in my way (that might be another issue - I'll see if I still experience 'eager tooltip' after this fix lands).

@snewell92 You can just use Shift+<esc> to close those. Thanks @cobbweb https://github.com/VSCodeVim/Vim/issues/1360

@snewell92 Just thought I would elaborate on some of the design reasons why shift+<esc> is unnecessary, and why we can't simply allow <esc> to close it. We used to have behavior somewhat like that, but people complained that it was very annoying to need to press <esc> twice everytime you're in a function (I agree). However, that leaves us with <esc> serving too many duties. When the user presses escape, do they want to remove the tooltip? Or do they want to go back to normal mode?

A similar thing applies for autocomplete and such.

I'm not sure how we would fix this. I don't think there's any vscode api call we can call to get rid of the tooltip.

I rebound literally everything that binds to <escape>, and none of them allow us to remove the tooltip.

Interestingly "Ctrl-[" doesn't work to hide the tooltip - only escape does. Is there a way to make "Ctrl-[" behave like escape?

I'm also interested in a command to close the tooltip so we can bind it to "ctrl+[" or any other key combination. That would make the focus grabbing less of an issue, for me at least.

Going in a little bit of a different direction, is there any way that vim keys can be enabled when a tooltip is in focus?

Two motivations:

  1. I'd like to use J/K to scroll up/down a large tooltip (in which case having it focused is actually desireable
  2. I'm finding myself accidentally closing a view a little too often by pressing Ctrl+w when trying to switch to the next split.

This is fixed as of VSCode 1.32.

I can confirm that the issue has been fixed - should the GH issue be closed?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

triztian picture triztian  路  3Comments

edwintorok picture edwintorok  路  3Comments

orn688 picture orn688  路  3Comments

liamdawson picture liamdawson  路  3Comments

typeoneerror picture typeoneerror  路  3Comments