Boost Your WebStorm Productivity: Mimic Sublime Text's Cmd+D Multi-Selection Shortcut

Published: 2025-12-04
Author: DP
Views: 5
Category: IDE
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.