DevToolBoxGRATIS
Blog

VS Code sneltoetsen: Complete productiviteitsgids

12 min lezenby DevToolBox

Why Keyboard Shortcuts Matter for Developers

VS Code keyboard shortcuts are one of the fastest ways to boost your coding productivity. Every time you reach for the mouse, you lose a few seconds -- and those seconds add up to hours over a week. Developers who master keyboard shortcuts in Visual Studio Code report completing tasks 30-50% faster than those who rely on menus and mouse clicks.

This guide covers the most impactful VS Code shortcuts for macOS and Windows/Linux, organized by workflow category. Whether you are editing code, navigating files, managing terminals, or debugging, these shortcuts will transform how you work.

Essential Navigation Shortcuts

Navigation is where you spend the most time. These shortcuts help you jump between files, symbols, and lines without touching the mouse.

File and Tab Navigation

ActionmacOSWindows / Linux
Quick Open (file by name)Cmd+PCtrl+P
Command PaletteCmd+Shift+PCtrl+Shift+P
Switch between open tabsCmd+Tab / Ctrl+TabCtrl+Tab
Go to specific tabCmd+1...9Ctrl+1...9
Close current tabCmd+WCtrl+W
Reopen closed tabCmd+Shift+TCtrl+Shift+T
Toggle sidebar visibilityCmd+BCtrl+B
Toggle terminalCmd+`Ctrl+`
Open Explorer panelCmd+Shift+ECtrl+Shift+E
Open Search panelCmd+Shift+FCtrl+Shift+F
Open Source Control panelCmd+Shift+GCtrl+Shift+G
Open Extensions panelCmd+Shift+XCtrl+Shift+X

Code Navigation

ActionmacOSWindows / Linux
Go to line numberCtrl+GCtrl+G
Go to symbol in fileCmd+Shift+OCtrl+Shift+O
Go to symbol in workspaceCmd+TCtrl+T
Go to definitionF12F12
Peek definition (inline)Option+F12Alt+F12
Go to type definitionCmd+ClickCtrl+Click
Find all referencesShift+F12Shift+F12
Go back / forwardCtrl+- / Ctrl+Shift+-Alt+Left / Alt+Right
Breadcrumb navigationCmd+Shift+.Ctrl+Shift+.

Editing Shortcuts That Save Hours

These editing shortcuts handle the tasks you repeat hundreds of times a day: moving lines, duplicating code, selecting text, and formatting.

Line Operations

ActionmacOSWindows / Linux
Move line up / downOption+Up / DownAlt+Up / Down
Copy line up / downShift+Option+Up / DownShift+Alt+Up / Down
Delete entire lineCmd+Shift+KCtrl+Shift+K
Insert line belowCmd+EnterCtrl+Enter
Insert line aboveCmd+Shift+EnterCtrl+Shift+Enter
Indent lineCmd+]Ctrl+]
Outdent lineCmd+[Ctrl+[
Toggle line commentCmd+/Ctrl+/
Toggle block commentShift+Option+AShift+Alt+A
Join linesCtrl+J(custom binding)

Selection and Multi-Cursor

Multi-cursor editing is one of VS Code's most powerful features. Once you master it, you will never want to edit text any other way.

ActionmacOSWindows / Linux
Add cursor above / belowCmd+Option+Up / DownCtrl+Alt+Up / Down
Add cursor at click positionOption+ClickAlt+Click
Select current wordCmd+DCtrl+D
Select all occurrences of wordCmd+Shift+LCtrl+Shift+L
Select current lineCmd+LCtrl+L
Expand selectionCmd+Shift+RightShift+Alt+Right
Shrink selectionCmd+Shift+LeftShift+Alt+Left
Column (box) selectionShift+Option+DragShift+Alt+Drag
Select all matching find resultsCmd+Shift+L after Cmd+FCtrl+Shift+L after Ctrl+F

Multi-Cursor Workflow Example

Scenario: Rename a CSS class in multiple places at once

1. Place cursor on the class name
2. Press Cmd+D (Ctrl+D) repeatedly to select each occurrence
3. Type the new name -- all instances update simultaneously

Before:
  <div class="old-card">
    <h2 class="old-card-title">...</h2>
    <p class="old-card-body">...</p>
  </div>

After (typed "new-card" once):
  <div class="new-card">
    <h2 class="new-card-title">...</h2>
    <p class="new-card-body">...</p>
  </div>

Search and Replace

ActionmacOSWindows / Linux
Find in fileCmd+FCtrl+F
Replace in fileCmd+Option+FCtrl+H
Find in workspace (all files)Cmd+Shift+FCtrl+Shift+F
Replace in workspaceCmd+Shift+HCtrl+Shift+H
Find next / previous matchCmd+G / Cmd+Shift+GF3 / Shift+F3
Toggle regex in searchCmd+Option+RAlt+R
Toggle case-sensitive searchCmd+Option+CAlt+C
Toggle whole word matchCmd+Option+WAlt+W

Regex Search Examples in VS Code

# Find all console.log statements
console\.log\(.*\)

# Find function declarations (JS/TS)
(function|const|let|var)\s+\w+\s*=\s*(async\s+)?\(

# Find TODO/FIXME comments
(TODO|FIXME|HACK|BUG):\s*.*

# Find imports from a specific module
import.*from\s+['"]@/components.*['"]

# Find empty HTML tags
<(\w+)[^>]*>\s*<\/\1>

# Replace: convert px to rem (capture group)
Find:    (\d+)px
Replace: calc($1 / 16 * 1rem)

Code Intelligence and Refactoring

ActionmacOSWindows / Linux
Trigger suggestionsCtrl+SpaceCtrl+Space
Trigger parameter hintsCmd+Shift+SpaceCtrl+Shift+Space
Quick Fix (lightbulb actions)Cmd+.Ctrl+.
Rename symbolF2F2
Format documentShift+Option+FShift+Alt+F
Format selectionCmd+K Cmd+FCtrl+K Ctrl+F
Organize importsShift+Option+OShift+Alt+O
Extract to function/variableCmd+. (select refactoring)Ctrl+. (select refactoring)
Fold / unfold code blockCmd+Option+[ / ]Ctrl+Shift+[ / ]
Fold all / unfold allCmd+K Cmd+0 / Cmd+K Cmd+JCtrl+K Ctrl+0 / Ctrl+K Ctrl+J

Terminal and Integrated Tools

ActionmacOSWindows / Linux
Toggle integrated terminalCmd+`Ctrl+`
Create new terminalCmd+Shift+`Ctrl+Shift+`
Split terminalCmd+\Ctrl+\
Switch terminal instanceCmd+Shift+[ / ]Ctrl+PageUp / PageDown
Clear terminalCmd+KCtrl+K
Kill terminalClick trash icon or type exitClick trash icon or type exit
Toggle problems panelCmd+Shift+MCtrl+Shift+M
Toggle output panelCmd+Shift+UCtrl+Shift+U

Debugging Shortcuts

ActionmacOSWindows / Linux
Start / continue debuggingF5F5
Stop debuggingShift+F5Shift+F5
Restart debuggingCmd+Shift+F5Ctrl+Shift+F5
Step overF10F10
Step intoF11F11
Step outShift+F11Shift+F11
Toggle breakpointF9F9
Conditional breakpointRight-click gutterRight-click gutter
Inline breakpointShift+F9Shift+F9
Debug consoleCmd+Shift+YCtrl+Shift+Y

Git Integration Shortcuts

ActionmacOSWindows / Linux
Open Source Control viewCmd+Shift+GCtrl+Shift+G
Stage changesClick + icon or Cmd+Shift+G then selectClick + icon
View diff of fileClick file in Source ControlClick file in Source Control
Open Git outputCmd+Shift+U (select Git)Ctrl+Shift+U (select Git)
Inline diff view toggleFrom Command PaletteFrom Command Palette

Window and Layout Management

ActionmacOSWindows / Linux
Split editor rightCmd+\Ctrl+\
Split editor downCmd+K Cmd+\Ctrl+K Ctrl+\
Focus editor group 1/2/3Cmd+1 / Cmd+2 / Cmd+3Ctrl+1 / Ctrl+2 / Ctrl+3
Move editor to next groupCmd+Option+RightCtrl+Alt+Right
Toggle full screenCmd+Ctrl+FF11
Toggle Zen ModeCmd+K ZCtrl+K Z
Zoom in / outCmd+= / Cmd+-Ctrl+= / Ctrl+-
Toggle word wrapOption+ZAlt+Z
Toggle minimapFrom Command PaletteFrom Command Palette

Custom Keybindings

You can customize any shortcut via Cmd+K Cmd+S (Ctrl+K Ctrl+S on Windows/Linux), or edit the keybindings.json file directly. Here are some popular custom bindings:

// keybindings.json - Open via Cmd+K Cmd+S, then click the {} icon
[
  // Duplicate line without clipboard (alternative)
  {
    "key": "cmd+shift+d",
    "command": "editor.action.copyLinesDownAction",
    "when": "editorTextFocus"
  },
  // Move between editor tabs
  {
    "key": "cmd+1",
    "command": "workbench.action.openEditorAtIndex1"
  },
  // Toggle terminal with Cmd+J (common preference)
  {
    "key": "cmd+j",
    "command": "workbench.action.togglePanel"
  },
  // Save all files
  {
    "key": "cmd+shift+s",
    "command": "workbench.action.files.saveAll"
  },
  // Quick switch between recent files
  {
    "key": "cmd+e",
    "command": "workbench.action.quickOpenRecent"
  }
]

Productivity Tips and Workflows

Tip 1: The Quick Open Power Pattern

Cmd+P (Ctrl+P) supports special prefixes:

  filename       β†’ Open file by name
  :lineNumber    β†’ Go to line (e.g., :42)
  @symbol        β†’ Go to symbol in file
  @:category     β†’ Symbols grouped by category
  #symbol        β†’ Go to symbol in workspace
  >command       β†’ Run VS Code command
  ?              β†’ Show help for Quick Open

Example workflow:
  1. Cmd+P β†’ type "user" β†’ opens UserComponent.tsx
  2. Cmd+P β†’ type ":125" β†’ jumps to line 125
  3. Cmd+P β†’ type "@handleSubmit" β†’ jumps to handleSubmit function

Tip 2: Emmet Abbreviations for HTML/CSS

VS Code has built-in Emmet support. Type abbreviations and press Tab:

HTML:
  div.container>ul>li*5>a    β†’ nested structure with 5 list items
  .card>.title+.body+.footer β†’ div with three children
  input:email                β†’ <input type="email">
  link:css                   β†’ <link rel="stylesheet">
  !                          β†’ full HTML5 boilerplate

CSS:
  m10        β†’ margin: 10px;
  p20-30     β†’ padding: 20px 30px;
  df         β†’ display: flex;
  jcc        β†’ justify-content: center;
  aic        β†’ align-items: center;
  bgc#333    β†’ background-color: #333;
  fz16       β†’ font-size: 16px;

Tip 3: Snippets for Repetitive Code

// Open: Cmd+Shift+P β†’ "Configure User Snippets"
// Select language (e.g., typescriptreact.json)
{
  "React Functional Component": {
    "prefix": "rfc",
    "body": [
      "interface ${1:Component}Props {",
      "  $2",
      "}",
      "",
      "export default function ${1:Component}({ $3 }: ${1:Component}Props) {",
      "  return (",
      "    <div>",
      "      $0",
      "    </div>",
      "  );",
      "}"
    ]
  },
  "useState Hook": {
    "prefix": "ush",
    "body": "const [$1, set${1/(.*)/${1:/capitalize}/}] = useState<$2>($3);"
  },
  "useEffect Hook": {
    "prefix": "ueh",
    "body": [
      "useEffect(() => {",
      "  $1",
      "  return () => {",
      "    $2",
      "  };",
      "}, [$3]);"
    ]
  }
}

VS Code Settings for Maximum Productivity

// settings.json - Open via Cmd+, then click {} icon
{
  // Auto-save files after delay
  "files.autoSave": "afterDelay",
  "files.autoSaveDelay": 1000,

  // Format on save and paste
  "editor.formatOnSave": true,
  "editor.formatOnPaste": true,

  // Smooth cursor animation
  "editor.cursorSmoothCaretAnimation": "on",
  "editor.cursorBlinking": "smooth",

  // Bracket pair colorization (built-in)
  "editor.bracketPairColorization.enabled": true,
  "editor.guides.bracketPairs": "active",

  // Sticky scroll (shows current scope)
  "editor.stickyScroll.enabled": true,

  // Minimap settings
  "editor.minimap.enabled": true,
  "editor.minimap.maxColumn": 80,

  // Font and display
  "editor.fontSize": 14,
  "editor.lineHeight": 1.6,
  "editor.fontLigatures": true,

  // Terminal settings
  "terminal.integrated.fontSize": 13,
  "terminal.integrated.cursorStyle": "line"
}

Essential Extensions for Shortcut Power Users

ExtensionPurposeKey Shortcut Added
VimVim keybindings in VS CodeAll Vim motions
GitLensGit blame, history, comparisonsVarious Git shortcuts
BookmarksMark and jump between linesCtrl+Alt+K to toggle
Project ManagerSwitch between projects quicklyAlt+Shift+P
Multi-Cursor Case PreservePreserves case during multi-cursor editsWorks with Cmd+D
IntelliCodeAI-assisted code completionEnhances Ctrl+Space

Printable Cheat Sheet Summary

╔══════════════════════════════════════════════════════════════╗
β•‘              VS CODE SHORTCUTS CHEAT SHEET                   β•‘
╠══════════════════════════════════════════════════════════════╣
β•‘                                                              β•‘
β•‘  NAVIGATE                    EDIT                            β•‘
β•‘  Cmd+P     Quick Open        Cmd+D     Select word           β•‘
β•‘  Cmd+Shift+P  Command Palette  Option+Up  Move line up      β•‘
β•‘  Ctrl+G    Go to line        Cmd+Shift+K  Delete line        β•‘
β•‘  F12       Go to definition  Cmd+/     Toggle comment        β•‘
β•‘  Cmd+Shift+O  Go to symbol   Shift+Option+F  Format          β•‘
β•‘                                                              β•‘
β•‘  SEARCH                     MULTI-CURSOR                     β•‘
β•‘  Cmd+F     Find in file     Cmd+D       Add next match       β•‘
β•‘  Cmd+Shift+F  Find in workspace  Cmd+Shift+L  All matches   β•‘
β•‘  Cmd+H     Replace           Option+Click  Add cursor        β•‘
β•‘                              Cmd+Option+Up  Cursor above     β•‘
β•‘                                                              β•‘
β•‘  TERMINAL                   DEBUG                            β•‘
β•‘  Cmd+`     Toggle terminal   F5        Start debugging       β•‘
β•‘  Cmd+Shift+`  New terminal   F9        Toggle breakpoint     β•‘
β•‘  Cmd+\     Split terminal    F10       Step over             β•‘
β•‘                              F11       Step into             β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Conclusion

Mastering VS Code keyboard shortcuts is an investment that pays off every day. Start by learning five shortcuts this week, practice them until they become muscle memory, then add five more the next week. Within a month, you will navigate and edit code dramatically faster.

The most impactful shortcuts to learn first are: Cmd+P (Quick Open), Cmd+D (select next occurrence), Cmd+Shift+P (Command Palette), Option+Up/Down (move lines), and Cmd+/ (toggle comment). These five alone will transform your daily workflow.

Use our Diff Checker to compare code changes, or explore our Git Commands Cheat Sheet to complement your VS Code productivity.

𝕏 Twitterin LinkedIn
Was dit nuttig?

Blijf op de hoogte

Ontvang wekelijkse dev-tips en nieuwe tools.

Geen spam. Altijd opzegbaar.

Try These Related Tools

{ }JSON Formatter.*Regex Tester

Related Articles

Git Commands Cheat Sheet: EssentiΓ«le commando's voor elke developer

Compleet Git-commando's cheatsheet: setup, branching, merging, rebasing, stashing en geavanceerde workflows.

TypeScript vs JavaScript: Wanneer welke gebruiken

Praktische vergelijking van TypeScript en JavaScript. Type-veiligheid, codevoorbeelden, migratiestrategieen, prestaties, ecosysteem en beslissingskader.

CSS-animaties: Van basis tot geavanceerde technieken

Beheers CSS-animaties: transitions, keyframes, laadanimaties, gespreide effecten, scroll-animaties en prestatieoptimalisatie.