Select all occurrences of selected word in VSCode

前端 未结 8 1819
不思量自难忘°
不思量自难忘° 2020-12-12 08:21

Are there any trick or extension to select all instances of selected word in visual studio code, to facilitate editing or deleting those instances without search and replace

8条回答
  •  猫巷女王i
    2020-12-12 08:53

    What if you want to select just a few?

    No problem, first:

    1. Ctrl+F find the letters by typing them
    2. ESC to quit searching (you need to this even when using Ctrl+Shift+L to select all occurences)

    OR

    1. just select those letters with your mouse or keyboard (Shift+arrows)

    Now that the mouse cursor is blinking on your first selection, using a few more Key Bindings (thanks for the ref j08691) you may:

    • Ctrl+D select the next occurrence
    • Ctrl+K+Ctrl+D skip the next occurrence
    • Ctrl+U undo one of the above

提交回复
热议问题