Visual Studio Code Keyboard Shortcuts for macOS
VS Code Keyboard Shortcuts for MacOS. View hotkeys online or download free PDF Cheat Sheet to work faster and navigate VS Code efficiently on MacOS.
General
- Show Command Palette
- Cmd+Shift+PorCmd+Shift+F1
- Quick Open, Go to File…
- Cmd+P
- New window/instance
- Cmd+Shift+N
- Close window/instance
- Cmd+W
- User Settings
- Cmd+,
- Keyboard Shortcuts
- Cmd+K,Cmd+S
Basic editing
- Cut line (empty selection)
- Cmd+X
- Copy line (empty selection)
- Cmd+C
- Move line down/up
- Opt+DownorOpt+Up
- Copy line down/up
- Opt+Shift+DownorOpt+Shift+Up
- Delete line
- Cmd+Shift+K
- Insert line below/above
- Cmd+ReturnorCmd+Shift+Return
- Jump to matching bracket
- Cmd+Shift+\
- Indent/outdent line
- Cmd+]orCmd+[
- Go to beginning/end of line
- HomeorEnd
- Go to beginning/end of file
- Cmd+UporCmd+Down
- Scroll line up/down
- Ctrl+Pg UporCtrl+Pg Dn
- Scroll page up/down
- Cmd+Pg UporCmd+Pg Dn
- Fold/unfold region
- Cmd+Opt+[orCmd+Opt+]
- Fold/unfold all subregions
- Cmd+K,Cmd+[orCmd+K,Cmd+]
- Fold/unfold all regions
- Cmd+K,Cmd+0orCmd+K,Cmd+J
- Add line comment
- Cmd+K,Cmd+C
- Remove line comment
- Cmd+K,Cmd+U
- Toggle line comment
- Cmd+/
- Toggle block comment
- Opt+Shift+A
- Toggle word wrap
- Opt+Z
Multi-cursor and selection
- Insert cursor
- Opt,Click
- Insert cursor above
- Cmd+Opt+Up
- Insert cursor below
- Cmd+Opt+Down
- Undo last cursor operation
- Cmd+U
- Insert cursor at end of each line selected
- Opt+Shift+I
- Select current line
- Cmd+L
- Select all occurrences of current selection
- Cmd+Shift+L
- Select all occurrences of current word
- Cmd+F2
- Expand / shrink selection
- Cmd+Ctrl+Shift+RightorCmd+Ctrl+Shift+Left
- Column (box) selection
- Opt+Shift+Drag
- Column (box) selection up/down
- Cmd+Opt+Shift+UporCmd+Opt+Shift+Down
- Column (box) selection left/right
- Cmd+Opt+Shift+LeftorCmd+Opt+Shift+Right
- Column (box) selection page up
- Cmd+Opt+Shift+Pg Up
- Column (box) selection page down
- Cmd+Opt+Shift+Pg Dn
Search and replace
- Find
- Cmd+F
- Replace
- Cmd+Opt+F
- Find next/previous
- Cmd+GorCmd+Shift+G
- Select all occurrences of Find match
- Opt+Return
- Add selection to next Find match
- Cmd+D
- Move last selection to next Find match
- Cmd+K,Cmd+D
Rich languages editing
- Trigger suggestion
- Ctrl+SpaceorCmd+I
- Trigger parameter hints
- Cmd+Shift+Space
- Format document
- Opt+Shift+F
- Format selection
- Cmd+K,Cmd+F
- Go to Definition
- F12
- Peek Definition
- Opt+F12
- Open Definition to the side
- Cmd+K,F12
- Quick Fix
- Cmd+.
- Show References
- Shift+F12
- Rename Symbol
- F2
- Trim trailing whitespace
- Cmd+K,Cmd+X
- Change file language
- Cmd+K,M
Navigation
Editor management
- Close editor
- Cmd+W
- Close folder
- Cmd+K,F
- Split editor
- Cmd+\
- Focus into 1st, 2nd, 3rd editor group
- Cmd+1orCmd+2orCmd+3
- Focus into previous/next editor group
- Cmd+K,Cmd+LeftorCmd+K,Cmd+Right
- Move editor left/right
- Cmd+K,Cmd+Shift+LeftorCmd+K,Cmd+Shift+Right
- Move active editor group
- Cmd+K,LeftorCmd+K,Right
File management
- New File
- Cmd+N
- Open File...
- Cmd+O
- Save
- Cmd+S
- Save As...
- Cmd+Shift+S
- Save All
- Cmd+Opt+S
- Close
- Cmd+W
- Close All
- Cmd+K,Cmd+W
- Reopen closed editor
- Cmd+Shift+T
- Keep preview mode editor open
- Cmd+K,Return
- Open next / previous
- Ctrl+TaborCtrl+Shift+Tab
- Copy path of active file
- Cmd+K,P
- Reveal active file in Finder
- Cmd+K,R
- Show active file in new window/instance
- Cmd+K,O
Display
- Toggle full screen
- Cmd+Ctrl+F
- Toggle editor layout (horizontal/vertical)
- Cmd+Opt+0
- Zoom in/out
- Cmd+=orCmd+Shift+-
- Show Explorer / Toggle focus
- Cmd+Shift+E
- Show Search
- Cmd+Shift+F
- Show Source Control
- Ctrl+Shift+G
- Show Debug
- Cmd+Shift+D
- Show Extensions
- Cmd+Shift+X
- Replace in files
- Cmd+Shift+H
- Toggle Search details
- Cmd+Shift+J
- Show Output panel
- Cmd+Shift+U
- Open Markdown preview
- Cmd+Shift+V
- Open Markdown preview to the side
- Cmd+K,V
Debug
- Toggle breakpoint
- F9
- Start/Continue
- F5
- Step into/ out
- F11orShift+F11
- Step over
- F10
- Stop
- Shift+F5
- Show hover
- Cmd+K,Cmd+I
Integrated terminal
- Show integrated terminal
- Ctrl+`
- Create new terminal
- Ctrl+Shift+`
- Copy selection
- Cmd+C
- Scroll up/down
- Cmd+UporCmd+Down
- Scroll page up/down
- Pg UporPg Dn
- Scroll to top/bottom
- Cmd+HomeorCmd+End
Need more than shortcuts?
Visit the Visual Studio Code app page for an overview and helpful links.
Want to suggest a new app, report a bug, or get help? Email us at info@hkeys.app.
For anything else or just a quick hello, write to us at info@hkeys.app.