1

Can someone tell me how to duplicate the line I am on as most of the people do in visual studio code and list for me some shortcuts or where I can see them?/.

MarioG8
  • 5,122
  • 4
  • 13
  • 29
  • What OS are you using? – Pedro Maia Oct 30 '21 at 08:06
  • By default, if you copy without having anything selected, it will copy the entire line including its linebreak, so if you directly paste on the same line it will duplicate it. – Possseidon Oct 30 '21 at 08:10
  • 1
    Does this answer your question? [How do I duplicate a line or selection within Visual Studio Code?](https://stackoverflow.com/questions/30203752/how-do-i-duplicate-a-line-or-selection-within-visual-studio-code) – Pedro Maia Oct 30 '21 at 08:10
  • Is your question about `visual studio` or `visual studio code`? The title and the tag says `visual studio` the question says `visual studio code`. – t.niese Oct 30 '21 at 09:03

2 Answers2

0

You can press ctrl+d to duplicate your current line.

Swagrim
  • 422
  • 4
  • 17
0

Duplicate line (down/up) Visual Studio Code.

Windows:

Shift+ Alt + ↓ or Shift+ Alt + ↑

Shortcuts for Win


Mac:

Shift + Option + ↓ or Shift +Option + ↑

Shortcuts for Mac


Linux:

Ctrl+Shift+Alt+↓ or Ctrl+Shift+Alt+↑

Shortcuts for Linux

(some distros You need use Numpad arrows)

MarioG8
  • 5,122
  • 4
  • 13
  • 29