2

In vscode, I have a python linter setup which helps me identify if there are any errors in my code, by underlining the error prone section with red swiggly lines. I can see the error message, if I hover over that section. Is there a keyboard shortcut which can show the error message, without actually requiring me to hover.

Attaching a screenshot for reference.

enter image description here

monte
  • 1,482
  • 1
  • 10
  • 26

2 Answers2

3

The command is called "Show Hover" (editor.action.showHover).

By default is bound to CtrlK CtrlI. (Last character here is upper case letter "i", if even code renders illegible sans-serif.)

(Or you can find it in and invoke it from the Command Palette.)


I too wasn't able to find it at first, because "hover" was not therm I'd search for. 'Mouse', 'cursor', 'tooltip', 'hint', 'info', 'bubble' or 'popup' were.

myf
  • 9,874
  • 2
  • 37
  • 49
  • thanks for sharing the command, but seems like it doesn't work very well [vim extension](https://marketplace.visualstudio.com/items?itemName=vscodevim.vim) – monte Nov 30 '22 at 14:49
  • There is some discussion about Vim extension/mode in the linked question. – myf Nov 30 '22 at 14:53
  • ignore the comment, it is working fine, I was trying with wrong pattern. – monte Nov 30 '22 at 14:54
1

You can also use the Error Lens extension to display error messages at the end of each line with an error.

myf
  • 9,874
  • 2
  • 37
  • 49
Gaël James
  • 157
  • 13