Duplicate a line in VS Code (Copy Line Down)
Most of us spend a lot of time in Visual Studio Code. Shortcuts are a big part of what makes it fast: less menu hunting, more flow.
One of the most useful actions is Copy Line Down — duplicate the current line (or selection) without touching the clipboard.
Set up Copy Line Down
- Open Settings → Keyboard Shortcuts (or File → Preferences → Keyboard Shortcuts on Windows/Linux).
- Search for Copy Line Down.
- Click the pencil icon to edit the binding, press the key combination you want, then press Enter.

The default on Windows is usually Shift+Alt+Down Arrow. On macOS it is often Shift+Option+Down Arrow.
More VS Code shortcuts worth memorizing
1. Command Palette (Show All Commands)
- Windows / Linux:
Ctrl+Shift+P - macOS:
Cmd+Shift+P
Open the palette and type a few letters of any command — no nested menus. You can also see and change keybindings from here.

2. Quick Open (go to file)
- Windows / Linux:
Ctrl+P - macOS:
Cmd+P
Jump to a file by name. Use Up / Down to move in the list; Right Arrow opens the file in the background so you can keep picking files without losing your place.

3. Toggle sidebar
- Windows / Linux:
Ctrl+B - macOS:
Cmd+B
Hide or show the sidebar when you want the editor full width.

4. Close the active editor tab
- Windows / Linux:
Ctrl+W - macOS:
Cmd+W
Closes the current tab — handy when many files are open.
5. Integrated terminal
- Toggle terminal: Windows / Linux: Ctrl + backtick · macOS: Cmd + backtick
- New terminal: Windows / Linux: Ctrl + Shift + backtick · macOS: Cmd + Shift + backtick
Use the first to show or hide the panel; use the second when you need an additional terminal instance.
6. Start debugging
- All platforms:
F5
Starts debugging with the current launch configuration — great once your launch.json is set up.
Happy coding — keep learning and keep your shortcuts under your fingers.