Move Line Up/Down in VS Code

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

Move Line Up/Down

Move current line up or down

text
Alt+↑/↓ (Windows)
⌥+↑/↓ (Mac)
💡 Reorder code without cut and paste
⚡ Works with multiple line selections
🔍 Preserves indentation and formatting
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