Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the keyboard shortcut in Visual Studio Code to pop up the Quick Fix menu?

Tags:

In the Visual Studio Code IDE, when it red squiggle underlines code, how do you pop up the menu to show "Quick Fix" suggestions and choose one of the suggested fixes to apply to your code? Example of underlined code:

enter image description here

like image 942
2Aguy Avatar asked Nov 14 '17 13:11

2Aguy


People also ask

How do I enable quick fix in VS Code?

Clicking on the Code Action lightbulb or using the Quick Fix command Ctrl+. will display Quick Fixes and refactorings. If you'd just like to see refactorings without Quick Fixes, you can use the Refactor command (Ctrl+Shift+R).

How do I show the menu bar in Visual Studio code?

Follow these steps: Press Alt to make menu visible. Click on the View menu, navigate to the Appearance option and choose Show Menu Bar.

What is Ctrl K in VS Code?

To launch the Define Keybinding widget, press Ctrl+K Ctrl+K. The widget listens for key presses and renders the serialized JSON representation in the text box and below it, the keys that VS Code has detected under your current keyboard layout.


Video Answer


2 Answers

On the Mac, use the Command + . keys to pop up a menu of Quick Fix suggestions.

On Windows, use the Ctrl + . keys.

Then just select the Quick Fix suggestion that you want to apply to your code.

Example on the Mac:

enter image description here

like image 149
2Aguy Avatar answered Sep 28 '22 01:09

2Aguy


The one more corresponding to the question is probably Ctrl+K Ctrl+I.

showHover shortcut

like image 27
Zwyx Avatar answered Sep 27 '22 23:09

Zwyx