55

I have to show errors/warnings by mouse now. Is there any hotkey or special button? I could find nothing in "Keyboard Shortcuts". Example of error:

5 Answers 5

64

The corresponding cmd name in VS Keybindings is editor.action.showHover. On mac for me the key combo was: cmd+k cmd+i. I'm not sure what it is on windows but you can find out 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, hit escape.

2
  • 2
    On Windows ctrl+k ctrl+i shows the hover.
    – P.T.
    Apr 14, 2021 at 17:29
  • As it is mentioned in the shortcuts cheat sheet (Help - Keyboard Shortcuts Reference) on Linux on default the same is ctrl + k ctrl + i.
    – Gleb
    Sep 28, 2022 at 15:47
58

In case you are using VSCode in vim mode (VSCodeVim extension) move your cursor to the underlined code and type gh.

See https://github.com/VSCodeVim/Vim#-vscodevim-tricks

27

Pressing F8 will focus the next problem/error. Shift + F8 will focus the previous problem. Here you can find an overview of all shortcuts for windows.

1
  • 2
    I found it. But it is not comfrotable when you have many warnings. For example, I use spell checker, and it marks some names of packages as mistake. Mar 7, 2018 at 8:52
1

On mac you can use

cmd+k cmd+i

it shows enter image description here

0

ctrl+k, n will show you the under carret error as inline text
(the same way that F8 / shift + F8 does)
rather than a hovering tooltip as ctrl+k, ctrl+i does.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.