Keyboard shortcut to show hover tooltip

后端 未结 3 1881
北海茫月
北海茫月 2021-02-05 00:25

Is there a keyboard shortcut to trigger the information tooltip that is typically shown when hovering over items in VS Code with the mouse?

Example hover tooltip:

<
相关标签:
3条回答
  • 2021-02-05 00:33

    You could use Ctrl + Shift + M to show all the errors:

    and then use Ctrl + . to show the list of the Quick Fixes.

    0 讨论(0)
  • 2021-02-05 00:45

    The corresponding cmd name in VS Keybindings is editor.action.showHover. On mac for me the key combo was:

    ⌘ Command + k

    ⌘ Command + i

    You can also access it through your command palette by typing show hover. It will show you the current keybinding and you can execute it as well.

    If you would like you can remap it like this:

    {
        "key": "ctrl+e",
        "command": "editor.action.showHover",
        "when": "editorTextFocus"
    }
    

    With that, if your cursor is within an error/warning squiggly line, you can hit ctrl+e to show what you would normally see with hover.

    To make the box disappear, I am having to hit escape. It would be cool if there was a editor.action.toggleHover or something like that, but in the meantime this works great!

    0 讨论(0)
  • 2021-02-05 00:57

    press Ctrl + K + I, that's what you want

    0 讨论(0)
提交回复
热议问题