You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何恢复VS Code中Ctrl+D的选择性多选中编辑快捷键?

Fixing Ctrl+D Multi-Select Functionality in VS Code

Got it, let's get your Ctrl+D working again—this is such a handy feature, so I totally get why you want it back!

The issue here is that your keybindings.json has a disabled version of the Ctrl+D command. That leading - in the command field tells VS Code to override and turn off the default binding. Here's how to fix it in two straightforward ways:

Option 1: Remove the Disabled Binding (Quickest Fix)

  1. Open the command panel with Ctrl+Shift+P and run Preferences: Open Keyboard Shortcuts (JSON) (you already nailed this step, nice!).
  2. Delete the entire entry that looks like this:
    { "key": "ctrl+d", "command": "-editor.action.addSelectionToNextFindMatch", "when": "editorFocus" }
    
  3. Save the keybindings.json file (just hit Ctrl+S).

VS Code will automatically fall back to its default key binding for Ctrl+D, which is exactly the multi-select functionality you need.

Option 2: Explicitly Re-Enable the Command

If you prefer to have a clear, custom binding (maybe to avoid future mix-ups), you can modify the existing entry instead of deleting it:

  1. In the same keybindings.json file, change the command value by removing the leading - so it looks like this:
    [ { "key": "ctrl+d", "command": "editor.action.addSelectionToNextFindMatch", "when": "editorFocus" } ]
    
  2. Save the file.

Check if It Works

Head back to any editor tab, select a word, and press Ctrl+D—you should see the next matching word get selected, and pressing it again will keep adding more matches as expected.

If you still run into issues, you can check for conflicting bindings: open the regular keyboard shortcuts menu (Ctrl+K Ctrl+S), search for editor.action.addSelectionToNextFindMatch, and make sure no other key combo is overriding Ctrl+D.

内容的提问来源于stack exchange,提问作者user6746919

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 16:02:48