Home News Update How-To Guides Detail article

Complete Visual Studio Code Shortcuts Guide for macOS - Enhance Your Coding Efficiency

Explore the full range of Visual Studio Code shortcuts for macOS. Master keyboard shortcuts to boost your productivity and streamline your development process in VS Code.
Complete Visual Studio Code Shortcuts Guide for macOS - Enhance Your Coding Efficiency

Here is a comprehensive list of Visual Studio Code keyboard shortcuts for Mac, organized by categories to enhance your coding productivity and efficiency:

General

  • Command Palette: Cmd + Shift + P or F1
  • Quick Open: Cmd + P
  • New File: Cmd + N
  • Open File: Cmd + O
  • Save: Cmd + S
  • Save As: Cmd + Shift + S
  • Save All: Cmd + Option + S
  • Close Editor: Cmd + W
  • Close Folder/Window: Cmd + Shift + W
  • Reopen Closed Editor: Cmd + Shift + T
  • Exit: Cmd + Q

File Management

  • New File: Cmd + N
  • Open File...: Cmd + O
  • Save: Cmd + S
  • Save As...: Cmd + Shift + S
  • Save All: Cmd + Option + S
  • Close: Cmd + W
  • Close All: Cmd + Option + W
  • Reopen Closed Editor: Cmd + Shift + T
  • Copy Path of Active File: Cmd + K P
  • Reveal Active File in Finder: Cmd + K R
  • Focus into Side Bar: Cmd + 0
  • Focus into Editor Group: Cmd + 1, Cmd + 2, Cmd + 3

Editing

  • Cut Line (without selection): Cmd + X
  • Copy Line (without selection): Cmd + C
  • Move Line Up/Down: Option + Up/Down
  • Copy Line Up/Down: Shift + Option + Up/Down
  • Delete Line: Cmd + Shift + K
  • Insert Line Below: Cmd + Enter
  • Insert Line Above: Cmd + Shift + Enter
  • Jump to Matching Bracket: Cmd + Shift + \
  • Indent Line: Cmd + ]
  • Outdent Line: Cmd + [
  • Go to Beginning of Line: Cmd + Left
  • Go to End of Line: Cmd + Right
  • Select All: Cmd + A
  • Undo: Cmd + Z
  • Redo: Cmd + Shift + Z
  • Find: Cmd + F
  • Replace: Cmd + Option + F
  • Toggle Line Comment: Cmd + /
  • Toggle Block Comment: Shift + Option + A
  • Find Next: Cmd + G
  • Find Previous: Cmd + Shift + G
  • Select All Occurrences of Find Match: Cmd + Shift + L
  • Add Selection to Next Find Match: Cmd + D
  • Add Cursor Above/Below: Cmd + Option + Up/Down

Search and Replace

  • Find: Cmd + F
  • Find Next: Cmd + G
  • Find Previous: Cmd + Shift + G
  • Replace: Cmd + Option + F
  • Replace in Files: Cmd + Shift + H
  • Find in Files: Cmd + Shift + F

Navigation

  • Quick Open, Go to File: Cmd + P
  • Go to Symbol: Cmd + Shift + O
  • Go to Definition: F12
  • Peek Definition: Option + F12
  • Open Definition to the Side: Cmd + K F12
  • Go to Implementation: Cmd + F12
  • Peek Implementation: Shift + Option + F12
  • Navigate Editor Group History: Cmd + Shift + Tab
  • Next Editor: Cmd + Tab
  • Previous Editor: Cmd + Shift + Tab
  • Next Editor in Group: Cmd + Option + Right
  • Previous Editor in Group: Cmd + Option + Left
  • Navigate Back: Cmd + -
  • Navigate Forward: Cmd + Shift + -
  • Go to Line...: Ctrl + G

Refactoring

  • Rename Symbol: F2
  • Refactor: Cmd + Shift + R

Debugging

  • Start Debugging: F5
  • Run without Debugging: Cmd + F5
  • Stop Debugging: Shift + F5
  • Restart Debugging: Cmd + Shift + F5
  • Step Over: F10
  • Step Into: F11
  • Step Out: Shift + F11
  • Continue: F5
  • Toggle Breakpoint: F9
  • Show Hover: Cmd + K Cmd + I

Integrated Terminal

  • Open Terminal: Ctrl + `
  • New Terminal: Cmd + Shift + `
  • Focus Next Terminal: Cmd + Down
  • Focus Previous Terminal: Cmd + Up
  • Kill Terminal: Cmd + C
  • Clear Terminal: Cmd + K

View

  • Toggle Full Screen: Control + Cmd + F
  • Toggle Zen Mode: Cmd + K Z
  • Toggle Sidebar Visibility: Cmd + B
  • Toggle Panel: Cmd + J
  • Show Explorer / Toggle Focus: Cmd + Shift + E
  • Show Search: Cmd + Shift + F
  • Show Source Control: Cmd + Shift + G
  • Show Debug: Cmd + Shift + D
  • Show Extensions: Cmd + Shift + X
  • Show Output: Cmd + Shift + U
  • Show Problems: Cmd + Shift + M

Split Editor

  • Split Editor: Cmd + \
  • Focus into Editor Group (1, 2, 3): Cmd + 1 / Cmd + 2 / Cmd + 3
  • Move Editor into Next Group: Cmd + K Cmd + Right
  • Move Editor into Previous Group: Cmd + K Cmd + Left
  • Toggle Split Layout: Cmd + Option + 0

Folding

  • Fold: Cmd + Option + [
  • Unfold: Cmd + Option + ]
  • Fold All: Cmd + K Cmd + 0
  • Unfold All: Cmd + K Cmd + J
  • Fold Level (1-9): Cmd + K Cmd + 1 / Cmd + K Cmd + 2 / ...

These shortcuts cover a broad range of functions to improve your workflow in Visual Studio Code on a Mac. For customization and more options, go to Code > Preferences > Keyboard Shortcuts.
Download PDF File: Full  Visual studio code short cut for macOS