Productivity Hacks for Power Users
Most PhpStorm users use less than 20 percent of the available shortcuts and navigation features. Anyone who learns to move through large PHP codebases without a mouse, run refactorings with keyboard combinations and use multi-cursor editing doubles their productivity in a short amount of time.
Table of Contents
- 1. Why shortcuts are the biggest productivity lever
- 2. Navigating code and files without a mouse
- 3. Structural navigation in PHP classes
- 4. Multi-cursor and column selection
- 5. Refactoring shortcuts: rename, extract and more
- 6. Creating and sharing custom keymaps
- 7. Search and replace with scope and regex
- 8. Abbreviations and live templates via shortcut
- 9. Keymap comparison: Linux vs. macOS
- 10. Summary
- 11. FAQ
1. Why shortcuts are the biggest productivity lever
Every reach for the mouse is a context interruption: the hand leaves the keyboard, the eye searches for the cursor, the hand finds the correct screen position, the click happens, the hand returns to the keyboard. That costs roughly one second per action; at a hundred such actions per hour that is almost two minutes spent exclusively on pointing device interactions. Spread across a workday and a year, that adds up to hours of pure cursor positioning time.
In PhpStorm there is a key combination for almost every action. The goal is not to know all 500+ shortcuts by heart, but to internalize the 30 to 40 most common actions so thoroughly that they become muscle memory. These include file navigation, code navigation, refactoring, search, multi-cursor and window management. Anyone who masters this core set navigates large PHP codebases at a speed that is simply not achievable with a mouse.
The best starting point: Ctrl+Shift+A (macOS: Cmd+Shift+A) opens the "Find Action" window. There you can search for any PhpStorm action by name, run it and, most importantly, the current shortcut is shown immediately. After three weeks of daily use you have seen the most common actions through the "Find Action" window so often that you learn the shortcuts along the way, without ever having consciously memorized them.
2. Navigating code and files without a mouse
The most important navigation shortcuts in PhpStorm revolve around quick opening: Ctrl+E opens the list of recently edited files, with a search field. Ctrl+Shift+E shows recently edited code locations, not just files. Ctrl+N finds PHP classes, Ctrl+Shift+N finds all files in the project. All of these dialogs support CamelCase abbreviations: "PM" finds "ProductManager", "MPVM" finds "MiroMegaViewModal".
For navigation within a file, Ctrl+F12 (file structure with instant search) and Alt+Up/Down (jumps between methods) are indispensable. Ctrl+G jumps to a line number. Ctrl+[ and Ctrl+] move the cursor to the beginning or end of the surrounding block. Ctrl+Alt+Left/Right navigates back and forth through the cursor history, ideal after a Ctrl+Click to return to your starting point.
3. Structural navigation in PHP classes
PhpStorm understands PHP semantics on a deeper level than a normal text editor. That enables structural navigation: Ctrl+Click on a method name jumps to the definition, even if it lives in a parent class, a trait or an interface. Alt+F7 shows all usages of a class, method or variable across the entire project, grouped by usage type (call, implementation, reference).
Ctrl+U jumps to the super method or the interface that declares a method. Ctrl+Alt+B shows all implementations of an interface method or an abstract method. These shortcuts make codebases with deep inheritance hierarchies, like Magento 2 with its service contracts and plugin chains, navigable. In a Magento project with fifty plugins on a repository interface, Ctrl+Alt+B on the method immediately shows all plugin classes.
<?php
declare(strict_types=1);
namespace Mironsoft\Catalog\Api;
/**
* Ctrl+Click on any method name -> jumps to definition
* Alt+F7 on interface -> shows all implementations
* Ctrl+Alt+B on method -> shows all plugin arounds/befores/afters
*/
interface ProductEnricherInterface
{
/**
* Enrich product data with additional metadata.
* Ctrl+U from implementation jumps back here.
*
* @param int $productId
* @param array<string, mixed> $context
* @return array<string, mixed>
*/
public function enrich(int $productId, array $context = []): array;
/**
* Check if enricher supports this product type.
* Ctrl+Alt+B shows all implementations across modules.
*
* @param string $typeId
* @return bool
*/
public function supports(string $typeId): bool;
}
4. Multi-cursor and column selection
Multi-cursor is one of the most productive features for repetitive edits. Alt+J selects the next occurrence of the currently selected text and adds an extra cursor. Ctrl+Alt+Shift+J selects all occurrences at once. Alt+Click manually places cursors at multiple locations. All cursors type simultaneously, which allows renaming variables without a global refactoring, for example when you only want to rename within one method rather than across the whole project.
Column selection (Alt+Shift+Insert to toggle) activates block selection mode. With it you can edit columns in a table simultaneously, for example when you have twenty lines in a PHP configuration array and want to change a value in all of them at once. The difference from regular multi-cursor: column selection always selects rectangular areas, multi-cursor selects semantic occurrences.
5. Refactoring shortcuts: rename, extract and more
Refactoring operations in PhpStorm are accessible through Ctrl+Alt+Shift+T (the complete refactoring menu) or direct shortcuts. Shift+F6 renames a variable, method, class or file; the rename affects all usages across the entire project, including docblocks, strings (optional) and configuration files. Ctrl+Alt+M extracts a selection into a new method with an automatically generated signature and correct dependency injection.
Ctrl+Alt+V extracts an expression into a local variable, Ctrl+Alt+C into a class constant. Ctrl+Alt+F extracts into a class field (property). These operations are safe: PhpStorm analyzes the scope and checks whether the extraction changes the code semantically. In Magento modules this is especially valuable when splitting long controller actions or service methods into smaller, testable units, without manually adjusting every call and return type.
6. Creating and sharing custom keymaps
PhpStorm ships with default keymaps for Windows/Linux (IntelliJ style) and macOS (macOS style). For teams with different operating systems or personal preferences, custom keymaps can be created under Settings → Keymap. A custom keymap is always based on a template (e.g. "Default" or "macOS") and only overrides the bindings that differ. This way familiar shortcuts remain intact while new ones are added.
Custom keymaps are stored as an .xml file in the PhpStorm configuration directory and can be shared with the team, either by committing the file to the repository or via PhpStorm Settings Sync. Especially useful: actions you use daily and for which no default shortcut exists get their own bindings. Example: assigning "Run current test" or "Open in Terminal" to frequently used key combinations.
<!-- PhpStorm custom keymap export excerpt -->
<!-- Location: ~/.config/JetBrains/PhpStorm2024.3/keymaps/Mironsoft.xml -->
<!-- Share with team by committing to .ide-config/ in repository -->
<keymap version="1" name="Mironsoft" parent="Default">
<!-- Run nearest test method from cursor -->
<action id="RunClass">
<keyboard-shortcut first-keystroke="ctrl shift F10" />
</action>
<!-- Open current file in integrated terminal -->
<action id="Terminal.OpenInTerminal">
<keyboard-shortcut first-keystroke="ctrl alt T" />
</action>
<!-- Toggle distraction-free mode for focused coding -->
<action id="ToggleDistractionFreeMode">
<keyboard-shortcut first-keystroke="ctrl alt D" />
</action>
<!-- PhpStan / Inspection run on current file -->
<action id="CodeInspection.OnEditor">
<keyboard-shortcut first-keystroke="ctrl alt I" />
</action>
</keymap>
7. Search and replace with scope and regex
Ctrl+Shift+F opens the global search with an adjustable scope: whole project, current directory, open files only, or a custom scope. Scopes can be saved in PhpStorm as named filter sets, for example "Module files only" or "Templates only". This enables precise searches without false hits from vendor directories or generated files.
The regex search supports groups and backreferences. For example, an outdated pattern like $this->helper('Vendor\Module\Helper\Data') can be found with a regex and replaced with the correct dependency injection call, with the helper class name captured as a group and reused in the replacement expression. "Find and Replace in Files" can be restricted to specific file types: *.phtml, *.xml, *.php.
8. Abbreviations and live templates via shortcut
Live templates are code snippets triggered by short abbreviations. Ctrl+J opens the list of all live templates available for the current context. In a PHP context, snippets are available for foreach, while, getter/setter methods and PHPDoc blocks. You create your own live templates under Settings → Editor → Live Templates with the abbreviation word and the template code including variables ($VAR$, $END$).
Postfix templates are a further development: they transform an expression you have already typed. $variable.if + Tab becomes if ($variable) {}. $collection.foreach becomes a foreach block over the collection. $value.return becomes return $value;. This transformation happens inline and does not interrupt your writing flow. In Magento projects, templates for common patterns are especially useful: DI constructor blocks, repository calls, exception handling patterns.
9. Keymap comparison: Linux vs. macOS
Teams with mixed operating systems often run into the problem that shortcuts from guides and pair programming sessions do not transfer. The most important shortcuts side by side between Linux/Windows and macOS:
| Action | Linux / Windows | macOS | Category |
|---|---|---|---|
| Find Action | Ctrl+Shift+A | Cmd+Shift+A | Navigation |
| Open class | Ctrl+N | Cmd+O | Navigation |
| Rename | Shift+F6 | Shift+F6 | Refactoring |
| Extract method | Ctrl+Alt+M | Cmd+Alt+M | Refactoring |
| Next occurrence | Alt+J | Ctrl+G | Multi-Cursor |
The differences between platforms mostly concern the modifier keys: Ctrl on Linux/Windows usually corresponds to Cmd on macOS, and Alt on Linux/Windows corresponds to Option on macOS. Exceptions occur mainly with navigation shortcuts, where macOS follows different conventions. The "Find Action" feature always shows the platform-specific shortcut, which is the most reliable way to find the correct key combination.
Mironsoft
PHP development, Magento 2 and developer coaching
Want to make your PHP team faster and more productive?
We offer PhpStorm workshops for development teams, from basic navigation to custom keymaps, multi-cursor and refactoring workflows. Tailored to your tech stack and your project.
Team workshop
Half-day PhpStorm workshop for your development team, with hands-on exercises on your real codebase
Keymap setup
Creating a shared custom keymap for the team and integrating it into the repository
Code review
Refactoring workshop using your existing PHP/Magento code and PhpStorm tooling
10. Summary
The path to becoming a PhpStorm power user is not a sprint but a continuous investment: practice one or two new shortcuts every day until they become muscle memory. The most important levers are "Find Action" (Ctrl+Shift+A) as a learning tool, structural navigation with Ctrl+Click and Alt+F7, multi-cursor with Alt+J for repetitive edits, and refactoring shortcuts for safe code changes without manual error hunting.
Custom keymaps make personal preferences permanent and consistent across the team. Live templates and postfix completion speed up typing common code patterns. The combination of navigation shortcuts and a semantic understanding of the PHP codebase turns PhpStorm into a tool that goes far beyond a text editor, an interactive learning environment that makes the structure of the code more visible with every shortcut.
PhpStorm shortcuts, the essentials at a glance
Getting started: Find Action
Ctrl+Shift+A (Cmd+Shift+A): finds any action by name and shows the shortcut. The most important learning tool for new shortcuts.
Structural navigation
Ctrl+Click to the definition, Alt+F7 for all usages, Ctrl+U to the super method, Ctrl+Alt+B for all implementations.
Multi-cursor
Alt+J selects the next occurrence. Ctrl+Alt+Shift+J selects all. Alt+Click sets a manual cursor. All type simultaneously.
Refactoring
Shift+F6 to rename, Ctrl+Alt+M to extract, Ctrl+Alt+V into a variable, Ctrl+Alt+C into a constant, always project-wide and semantically correct.