Copy Line Up/Down in VS Code

From the VS Code Shortcuts cheat sheet · Editing · verified Jul 2026

Copy Line Up/Down

Duplicate current line above or below

text
Shift+Alt+↑/↓ (Windows)
⇧+⌥+↑/↓ (Mac)
💡 Duplicate entire lines quickly
⚡ Works with multiple line selections
🔍 Maintains proper indentation
editing

Continue with VS Code Shortcuts

Save the full cheat sheet or work through every related task.

More VS Code tasks

Back to the full VS Code Shortcuts cheat sheet