EN
VS Code - duplicate current line
7
points
In this short article we would like to show how to duplicate / copy current line in VS Code.
Simple steps:
- put caret to line that you want to copy,
- use one keys combination from below table,
Depending on operating system:Keys combination Operating System Shift
+Alt
+Up/Down
on Windows Shift
+Option
+Up/Down
on Mac Ctrl
+Shift
+Alt
+Up/Down
on Ubuntu
Using VS Code menu
It is possible to make copy from options in VS Code menu.
Simple steps:
- put caret to line that you want to copy,
- go to VS Code menu and use:
Selection -> Copy Line Up
or
Selection -> Copy Line Down
Screenshot:
