Quick Fix / Show Actions
What is Quick Fix / Show Actions?
Quick Fix / Show Actions: Open the lightbulb menu of suggested fixes and refactorings for the code under the cursor. The quick fix menu, shown as a light bulb, offers suggested fixes and refactorings for the code under the cursor. In VS Code press Ctrl+. or Cmd+.; in JetBrains IDEs press Alt+Enter or Option+Enter. It can add a missing import, create a method that does not exist yet, fix a type error, extract code into a variable, or apply a suggestion from your linter.
Frequently asked questions about Quick Fix / Show Actions
What should you keep in mind with Quick Fix / Show Actions?
In JetBrains IDEs especially, Alt+Enter is the single most useful shortcut, because what it offers depends on context. Whenever the editor underlines something, try it before fixing the problem by hand. It saves typing and teaches you about language and framework features you might not have known. Do read what it proposes, though; an automatic fix is a suggestion, not a guarantee.
At a glance
| Category | Keyboard shortcuts |
|---|---|
| Explained by | Reinier de la Parra |
| Updated |