Search code examples
visual-studio-codekeyboard-shortcutshotkeys

vscode: how to change the hotkey of 'replace' and 'next match'


In the replace mode of vscode:

enter image description here

The hotkeys of 'go to next match' and 'replace' are both enter.

I want to selectively replace some words. For example, in the lower part of the image: I want to rename hidden_dim' but not hidden_dim_in`.

Hitting the key enter will repeatedly do either 'go to next match' or 'replace'. How could I set different hotkeys for these two functions?


Solution

  • Inspired by @amordo's answer, I find an easier way to "go to next match" while replacing words in vscode:

    F3

    The F3-key is the default setting of vscode for finding next, which works properly during replacing.

    enter image description here

    Ps. the Shift + Enter short cut, doesn't help in this case. It will add a new line.enter image description here