base12
base12

Reputation: 185

Copy entire line and paste it BELOW current line

I'm pretty new to the VSCode editor.

When previously using atom, placing the cursor at the end of the line and pressing Ctrl+C would copy that line. Placing the cursor at the end of another line and pressing Ctrl+V would paste it below that line.

It seems that in VSCode, I can copy a line in the same way, but when I paste in the same way it places the line above the selected line. That seems pretty counter-intuitive when my cursor is at the end of the line.

Is there a setting somewhere to change this?

EDIT: I am not trying to duplicate a line where it is. I want to copy a line and paste it in a different file. But the paste function places the line above the cursor.

Upvotes: 10

Views: 10445

Answers (1)

gguney
gguney

Reputation: 2643

Go To Preferences -> Keyboard Shortcuts and search for "Duplicate Selection" and add whatever keybinding for it (For me it is ctrl+D).

It will duplicate your selected line to below.

Upvotes: 6

Related Questions