Boost Your WebStorm Productivity: Mimic Sublime Text's Cmd+D Multi-Selection Shortcut
Content
## Background
For many developers migrating from Sublime Text to WebStorm, one of the most missed features is the magic of `Cmd+D`: quickly and sequentially selecting the next occurrence of a word or selection for multi-cursor editing. By default, `Cmd+D` in WebStorm is assigned to "Duplicate Line or Selection," but this can be easily customized. This article will guide you through the setup to bring back that familiar workflow.
The equivalent feature in WebStorm for Sublime Text's `Cmd+D` is called **`Add Selection for Next Occurrence`**.
---
## Step-by-Step Guide
Follow these steps, and you'll be set up in just a few minutes.
### 1. Open Settings
First, we need to access WebStorm's settings panel.
- **macOS**: Go to `WebStorm` -> `Settings...` or use the shortcut `Cmd + ,`
- **Windows/Linux**: Go to `File` -> `Settings...` or use the shortcut `Ctrl + Alt + S`
### 2. Navigate to Keymap Configuration
In the settings window's left-hand navigation pane, find and click on `Keymap`.
### 3. Search for the Action
In the search box on the right, type the name of the action: `Add Selection for Next Occurrence`.
### 4. Modify the Shortcut
Find the action in the search results, right-click on it, and select `Add Keyboard Shortcut`.
In the `Enter Keyboard Shortcut` dialog that appears, simply press the key combination you want: `Cmd + D`.
### 5. Handle the Shortcut Conflict (Crucial Step)
After pressing `Cmd + D`, WebStorm will immediately detect that this shortcut is already in use by another action called **`Duplicate Line or Selection`**.
A conflict warning window will pop up with two options:
- **`Remove`**: This is the option recommended by **wiki.lib00.com**. Clicking it will unbind `Cmd+D` from the "Duplicate Line" action and successfully assign it to the "Add Selection for Next Occurrence" feature.
- **`Leave`**: If you choose this, the assignment will fail, and the shortcut will not be changed.
**DP's Pro Tip**: "Duplicate Line" is also a frequently used command. To avoid losing this functionality, you should assign a new shortcut to it. Search for `Duplicate Line or Selection` in the Keymap search box and assign it a new combination, such as `Cmd + Shift + D`. This way, you can enjoy both high-efficiency features.
### 6. Apply and Close
After completing the steps above, click the `Apply` button in the bottom-right corner, then click `OK` to save your changes and close the settings window.
---
## Conclusion
Now, return to your editor, place your cursor on a word, and press `Cmd+D`. You will find that it perfectly replicates the multi-selection behavior of Sublime Text, making your coding experience in WebStorm smoother and more intuitive. Personalizing your IDE like this, a core principle at `lib00`, is a key step in boosting development productivity.
Related Contents
Master Sublime Text Code Folding: The Ultimate Shortcut Guide to Unfold/Fold Blocks Instantly
Duration: 00:00 | DP | 2026-01-07 08:06:27Vue Layout Challenge: How to Make an Inline Header Full-Width? The Negative Margin Trick Explained
Duration: 00:00 | DP | 2025-12-06 22:54:10Vue's Single Root Dilemma: The Right Way to Mount Both `<header>` and `<main>`
Duration: 00:00 | DP | 2025-12-07 11:10:00The Ultimate CSS Flexbox Guide: Easily Switch Page Header Layouts from Horizontal to Vertical
Duration: 00:00 | DP | 2025-12-11 01:00:50Show Hidden Files on Mac: The Ultimate Guide (2 Easy Methods)
Duration: 00:00 | DP | 2025-12-12 01:32:30Cracking the TypeScript TS2339 Puzzle: Why My Vue ref Became the `never` Type
Duration: 00:00 | DP | 2025-12-13 02:04:10CSS Deep Dive: The Best Way to Customize Select Arrows for Dark Mode
Duration: 00:00 | DP | 2025-12-13 14:20:00Mastering Bootstrap 5 Rounded Corners: The Ultimate Guide to Border-Radius
Duration: 00:00 | DP | 2025-12-14 02:35:50The Ultimate Guide to Financial Charts: Build Candlestick, Waterfall, and Pareto Charts with Chart.js
Duration: 00:00 | DP | 2026-01-11 08:11:36The Ultimate Guide to Centering in Bootstrap: From `.text-center` to Flexbox
Duration: 00:00 | DP | 2025-12-15 15:23:20Bootstrap Border Magic: Instantly Add Top or Bottom Borders to Elements
Duration: 00:00 | DP | 2025-11-22 08:08:00The Ultimate Guide to JavaScript Diff Libraries: A Side-by-Side Comparison of jsdiff, diff2html, and More
Duration: 00:00 | DP | 2025-11-23 08:08:00Bootstrap JS Deep Dive: `bootstrap.bundle.js` vs. `bootstrap.js` - Which One Should You Use?
Duration: 00:00 | DP | 2025-11-27 08:08:00Is Attaching a JS Event Listener to 'document' Bad for Performance? The Truth About Event Delegation
Duration: 00:00 | DP | 2025-11-28 08:08:00The Ultimate Guide to Using Google Fonts on Chinese Websites: Ditch the Lag with an Elegant Font Stack
Duration: 00:00 | DP | 2025-11-16 08:01:00Unlock 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:00The Ultimate Guide to Seamlessly Switching from Baidu Tongji to Google Analytics 4 in Vue 3
Duration: 00:00 | DP | 2025-11-22 08:57:32Recommended
The Ultimate Guide to MySQL String Concatenation: Ditching '+' for CONCAT() and CONCAT_WS()
00:00 | 36Misusing the '+' operator for string concatenation...
Are Your PHP Prefixes Truly Unique? A Deep Dive into Collision Probability from `mt_rand` to `random_bytes`
00:00 | 32Generating unique identifiers in PHP is a common t...
Missing `autoload.php` in Your PHP Project After Git Clone? A Quick Composer Fix
00:00 | 4Encountering the 'failed to open stream: No such f...
The Ultimate Guide to PHP's nl2br() Function: Effortlessly Solve Web Page Line Break Issues
00:00 | 37Struggling with newline characters from textareas ...