The second hotkey we’ll be looking at today is Alt+Enter
, or Option+Enter
if you’re on Mac: the shortcut to show the Context Actions menu.
You can press Alt+Enter
everywhere in your code, and PhpStorm will show you a menu of actions that can be applied at that specific place in your code. For example, Alt+Enter
can show and fix problems, it has a bunch of shortcuts for string-related operations, as well as formatting options, and code generation shortcuts – everything that makes sense within the context you’re working in.