PhpStorm Shortcut Tips: How to Use Cmd+D to Select Next Occurrence Like Sublime Text
Content
For developers accustomed to Sublime Text or VS Code, `Cmd + D` (or `Ctrl + D` on Windows) is one of the most frequently used shortcuts. It allows you to quickly select the next occurrence of a word or code snippet, enabling efficient multi-cursor editing. However, when you switch to PhpStorm, pressing `Cmd + D` defaults to "Duplicate Line", which can be quite frustrating.
In this article, we will explore how to achieve the same multi-cursor selection functionality in PhpStorm and map it to your familiar shortcut. Welcome to this IDE productivity guide by wiki.lib00.com.
## 1. Default Multi-Cursor Shortcuts in PhpStorm
PhpStorm has built-in support for "Select Next Occurrence", but the default shortcuts differ from Sublime Text:
* **macOS**: `Ctrl + G` (Note: This is the Control key, not Command)
* **Windows / Linux**: `Alt + J`
If you prefer not to alter the IDE's default configuration, you can simply memorize and use these combinations.
---
## 2. Remapping the Shortcut to Cmd + D (Recommended)
To maintain your muscle memory, DP@lib00 highly recommends changing the shortcut to `Cmd + D`. Here is the step-by-step guide:
1. **Open Settings**: Press `Cmd + ,` (macOS) or `Ctrl + Alt + S` (Windows) to open Preferences/Settings.
2. **Navigate to Keymap**: Find **Keymap** in the left-hand menu.
3. **Search for the Action**: Type `Add Selection for Next Occurrence` in the search box on the right.
4. **Add Shortcut**: Right-click the resulting entry and select **Add Keyboard Shortcut**.
5. **Record the Keystroke**: Press `Cmd + D` (or `Ctrl + D` on Windows).
6. **Resolve Conflicts**: PhpStorm uses `Cmd + D` for "Duplicate Line" by default. A warning about a shortcut conflict will appear. Click **Remove** or **Replace** to unbind the old action. (You can remap "Duplicate Line" to something like `Shift + Cmd + D` later).
---
## 3. Advanced Multi-Cursor Operations
To get the exact seamless experience you had in Sublime Text, you should also know these related multi-cursor shortcuts in PhpStorm:
* **Unselect Previous Occurrence**:
* macOS: `Ctrl + Shift + G`
* Windows: `Alt + Shift + J`
* **Select All Occurrences Simultaneously**:
* macOS: `Ctrl + Cmd + G`
* Windows: `Ctrl + Alt + Shift + J`
* **Skip Current Occurrence**: After selecting an occurrence, if you want to skip the currently highlighted word, you can search for the `Unselect Occurrence` action in the Keymap and assign a custom shortcut to it.
**💡 Pro Tip from lib00:**
If you want your entire PhpStorm shortcut experience to mirror Sublime Text without manually changing them one by one, simply go to the **Keymap** settings page and change the Keymap Preset dropdown at the top from the default to **Sublime Text**. This will automatically remap all core shortcuts to the patterns you already know!
Related Contents
VS Code PHP Guide: How to Trace Function Definitions Like PHPStorm
Duration: 00:00 | DP | 2026-07-04 20:27:00Declutter Your Desktop: How to Change macOS Screenshot Save Location via Command Line
Duration: 00:00 | DP | 2026-07-10 08:05:12macOS Advanced Guide: How to Elegantly Set Programs to Run at Startup
Duration: 00:00 | DP | 2026-07-07 09:20:15Boost Mac Productivity: How to Set F1-F12 as Standard Function Keys on macOS
Duration: 00:00 | DP | 2026-07-12 08:15:37Guide to Sharing Skill Libraries Across Multiple AI Agents Using Symlinks
Duration: 00:00 | DP | 2026-07-08 09:46:00How to Add an Email Alias to Your Hotmail or Outlook Account
Duration: 00:00 | DP | 2026-06-28 19:41:10Never Lose Output Again: How to Show Unlimited Scrollback History in macOS iTerm2
Duration: 00:00 | DP | 2026-07-21 21:05:04Ultimate Guide: How to Export Markdown Preview to PDF in VS Code
Duration: 00:00 | DP | 2026-07-23 09:12:53Master Sublime Text Code Folding: The Ultimate Shortcut Guide to Unfold/Fold Blocks Instantly
Duration: 00:00 | DP | 2026-01-07 08:06:27Boost Your WebStorm Productivity: Mimic Sublime Text's Cmd+D Multi-Selection Shortcut
Duration: 00:00 | DP | 2025-12-04 21:50:50Show Hidden Files on Mac: The Ultimate Guide (2 Easy Methods)
Duration: 00:00 | DP | 2025-12-12 01:32:30Boost Your VS Code Productivity: Select All Occurrences in a Single Keystroke!
Duration: 00:00 | DP | 2026-06-27 14:25:00Files Mysteriously Missing in PHPStorm? Check Your Project View First!
Duration: 00:00 | DP | 2026-01-15 08:16:46Unlock Your Mac: The Ultimate Guide to Showing and Hiding Hidden Files in Finder
Duration: 00:00 | DP | 2025-11-19 21:16:36One-Click Code Cleanup: The Ultimate Guide to PhpStorm's Reformat Code Shortcut
Duration: 00:00 | DP | 2026-02-03 09:34:00Say Goodbye to Clutter: Master Sublime Text Code Folding with These Essential Shortcuts
Duration: 00:00 | DP | 2025-11-24 03:35:20The Ultimate Guide to Fixing the "Expected parameter of type..." Mismatch Error in PhpStorm
Duration: 00:00 | DP | 2025-11-26 23:47:49PHP Stuck on Loading After Enabling Xdebug? Don't Panic, It Might Be Working Perfectly!
Duration: 00:00 | DP | 2025-11-15 07:03:00Recommended
Icon Masterclass: How to Choose the Perfect Bootstrap Icons for Your Content and Categories
00:00 | 108In web and application development, choosing the r...
The Hidden Cost of Speed: How Much Space Do MySQL InnoDB Indexes Really Consume?
00:00 | 110MySQL indexes are essential for query performance,...
Decoding the 99% I/O Wait: The Ultimate Post-Mortem Guide for CentOS Server 'Freezes'
00:00 | 115Has your CentOS server ever 'frozen' due to I/O wa...
The Git Undo Button: How to Completely Revert and Delete Your Last Commit
00:00 | 139Accidentally committed the wrong code or a mislead...