DELAPARRA
Index
Color
NL
Category: Keyboard shortcuts

Copy Line Up / Down

Explained by Updated

What is Copy Line Up / Down?

Copy Line Up / Down: Duplicate the current line above or below the original. Copy line up or down duplicates the current line, or the selected lines, directly above or below. In VS Code it is Shift+Alt+Up/Down on Windows and Linux, or Shift+Option+Up/Down on a Mac. JetBrains IDEs use Ctrl+D or Cmd+D. It is faster than select, copy and paste, and it does not touch your clipboard. That is handy when you are building a list of similar entries, such as routes, array items or test cases, and only need to change one value in each copy.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Copy Line Up / Down

What should you keep in mind with Copy Line Up / Down?

Its sibling, move line up or down, uses Alt+Up/Down in VS Code and shifts lines without duplicating them. Together they cover most of the small reshuffling you do while writing code. If you catch yourself copying the same line three times, a loop or a data structure may be the better solution.

At a glance

CategoryKeyboard shortcuts
Explained by
Updated

More Keyboard shortcuts terms

All terms starting with C

Skills

Manuals

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.