10 VS Code Keyboard Shortcuts Every Programmer Should Know

These ten shortcuts are for Visual Studio Code, using its default bindings on a US keyboard. They help with navigation and editing; they are not universal shortcuts for every programming editor. Extensions, keymaps, your operating system, and keyboard layout can override them.

10 Useful VS Code Shortcuts

ActionWindows / LinuxmacOS
Command PaletteCtrl+Shift+PCmd+Shift+P
Quick Open fileCtrl+PCmd+P
Jump to matching bracketCtrl+Shift+\Cmd+Shift+\
Delete lineCtrl+Shift+KCmd+Shift+K
Insert line belowCtrl+EnterCmd+Enter
Insert line aboveCtrl+Shift+EnterCmd+Shift+Enter
Move line down / upAlt+Down / Alt+UpOption+Down / Option+Up
Toggle line commentCtrl+/Cmd+/
Select next matching occurrenceCtrl+DCmd+D
Open Keyboard ShortcutsCtrl+K then Ctrl+SCmd+K then Cmd+S

Check the official default keybindings reference and your editor’s Keyboard Shortcuts view if a command behaves differently. “Then” means a key chord: release the first combination before pressing the second. The backslash in the matching-bracket shortcut is a literal \ key, not formatting around the shortcut.

Use Navigation Before Reaching for the Mouse

Quick Open is useful when you know part of a filename. The Command Palette helps when you know the action but cannot remember its shortcut. Try them on a small project first, then use the same approach in your normal editing instead of learning all ten combinations at once.

Matching-bracket navigation is useful in nested code. Put the cursor beside a bracket and use the command to inspect its partner. The jump can help you orient yourself, but it does not establish that the code is correct or replace language diagnostics and tests.

Practice Editing on Disposable Text

Create a scratch file with several lines of ordinary text. Move one line up, insert a line below it, and delete a different line. Undo each operation and check the result before applying unfamiliar combinations to real project files. A shortcut that saves a mouse movement can still introduce an unwanted edit if the selection is different from what you expected.

For repeated edits, select a word and add its next occurrence. Inspect the selections before typing a replacement. Do not assume every occurrence has the same meaning in code, and use language-aware rename tools where they are more appropriate.

If a Shortcut Does Not Work

Open Keyboard Shortcuts and search by the action name. Check whether your active keymap, extension, operating system, or input layout uses the same combination. Some commands depend on which panel has focus. A terminal, editor, search box, and browser can respond differently to identical keys.

Linux defaults can differ from Windows for some other commands, particularly combinations that conflict with desktop environments. Avoid copying a Windows-only list into every environment without checking. VS Code also lets you customize bindings; document your changes if you work across several machines.

Combine Editing Skills With Accurate Typing

Keyboard shortcuts reduce navigation and editing friction, while typing practice develops control over text entry. Neither substitutes for reading, planning, or testing code. If symbols and brackets slow your typing, use the punctuation or code lesson in the typing workspace rather than judging progress only from common-word speed.

Choose two shortcuts you use regularly, practice them in context, and add another once the movement feels familiar. For a broader keyboard routine, see typing speed and accuracy practice. The goal is fewer unnecessary interruptions, not a claim that a shortcut automatically makes someone a better programmer.

Similar Posts