Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CTRL+D is not working in vs code copy similar code

Previous in I have used ctr+d for duplicating the code many times, but when I switched to desktop and installed vs code and all the necessary extensions for my react project. And now this CTRL+D keyboard shortcut is not working. Can any help me to solve this issue

like image 330
Sushil Avatar asked Mar 08 '26 18:03

Sushil


1 Answers

I recently met this issue too. I found a solution, see this: https://linuxpip.org/duplicate-lines-vscode/. The main step are:

  1. File > Preferences > Keyboard Shortcuts.
  2. type "copy line",then you will see the related shortcuts.
  3. remember the new shortcut(e.g. Shift + Alt + Down) or modify the shortcut to ctrl + D.
like image 149
Wade Wang Avatar answered Mar 10 '26 13:03

Wade Wang