VSCode shortcuts - Mac
1 VSCode - Power editing
Move current line up | ⌥ Opt+ |
Move current line down | ⌥ Opt+ |
Duplicate | ⌘ Cmd+D |
Redo | ⌘ Cmd+⇧ Shift+Z |
Comment / uncomment | ⌘ Cmd+/ |
Block comment | ⌥ Opt+⇧ Shift+A |
Expand selection | Ctrl+⇧ Shift+ |
Shrink selection | Ctrl+⇧ Shift+ |
Collapse all | ⌘ Cmd+K, ⌘ Cmd+0 |
Expand all | ⌘ Cmd+K, ⌘ Cmd+J |
Collapse at cursor | ⌥ Opt+⇧ Shift+[ |
Expand at cursor | ⌥ Opt+⇧ Shift+[_]_] |
Toggle wrap text | ⌥ Opt+Z |
Uppercase | ⌘ Cmd+⇧ Shift+U, U |
Lowercase | ⌘ Cmd+⇧ Shift+U, L |
Toggle quotes | ⌘ Cmd+K, ⇧ Shift+; |
Auto-reformat code | ⌥ Opt+⇧ Shift+F |
Rename with refactor | ⌘ Cmd+F2 |
Paste from clipboard history | ⌘ Cmd+⇧ Shift+V |
Delete line | ⌘ Cmd+⇧ Shift+K |
Select line | ⌘ Cmd+L |
Multiple cursors | ⌥ Opt + Click. |
Block select | ⌥ Opt+⇧ Shift + Drag. |
Join lines | Ctrl+J |
Select next occurrence (of selection) | ⌥ Opt+J |
Select previous occurrence (of selection) | ⌥ Opt+⇧ Shift+J |
Select all occurrences | ⌘ Cmd+⇧ Shift+L |
Clone caret above | ⌥ Opt+⇧ Shift+ |
Clone caret below | ⌘ Cmd+⌥ Opt+ |
Toggle Match Case (in find) | ⌘ Cmd+⌥ Opt+C |
Toggle Words (in find) | ⌘ Cmd+⌥ Opt+W |
Toggle Regex (in find) | ⌘ Cmd+⌥ Opt+R |
Fast scroll | ⌥ Opt + Scroll |
Scroll one page up | ⌘ Cmd+PageUp |
Scroll one page down | ⌘ Cmd+PageDown |
Decrease text size | ⌘ Cmd+- |
Increase text size | ⌘ Cmd++ |
Open link at cursor | ⌥ Opt+L |
2 VSCode - Lookup
Show parameters (on selected function) | ⌘ Cmd+⇧ Shift+Space |
Finding matching bracket | ⌘ Cmd+⇧ Shift+\ |
Copy line reference | ⌘ Cmd+⌥ Opt+⇧ Shift+C |
Find new commands | ⌘ Cmd+⇧ Shift+P |
3 VSCode - Search & replace
Find in file | ⌘ Cmd+F |
Replace in file | ⌘ Cmd+⌥ Opt+F |
Find in project | ⌘ Cmd+⇧ Shift+F |
Replace in project | ⌘ Cmd+⇧ Shift+H |
Go to next occurrence (of Find in files) | F4 |
Go to prev occurrence (of Find in files) | ⇧ Shift+F4 |
Show previous searches | |
Go to previous input (of Find in files) | ⌘ Cmd+ |
Go to next input (of Find in files) | ⌘ Cmd+ |
Last edit location | ⌘ Cmd+⇧ Shift+Backspace |
4 VSCode - Git
Next change (single file) | Ctrl+⌥ Opt+⇧ Shift+ |
Previous change (single file) | Ctrl+⌥ Opt+⇧ Shift+ |
Annotate | ⌘ Cmd+⌥ Opt+G, B |
Revert | ⌘ Cmd+⌥ Opt+Z |
Show Git panel | Ctrl+⇧ Shift+G |
5 VSCode - Jump in code
Add / remove number bookmark | ⌘ Cmd+⇧ Shift+1-9 |
Go to number bookmark | ⌘ Cmd+1-9 |
Add / remove bookmark | ⌘ Cmd+⌥ Opt+K |
Go to next bookmark | ⌘ Cmd+⌥ Opt+L |
Go to previous bookmark | ⌘ Cmd+⌥ Opt+J |
Show bookmarks | ⌘ Cmd+⌥ Opt+⇧ Shift+K |
Go to line number | Ctrl+G |
Jump to definition (on selected item) | F12, or ⌘ Cmd + Click |
Find usages | ⇧ Shift+F12, or ⌘ Cmd + Click |
Next function in file | Ctrl+ |
Previous function in file | Ctrl+ |
Show structure popup (to navigate methods) | ⌘ Cmd+⇧ Shift+. |
Go to next error | ⌥ Opt+F8 |
Go to previous error | ⌥ Opt+⇧ Shift+F8 |
6 VSCode - Navigate files
Find file | ⌘ Cmd+P |
Find symbol (methods or properties) | ⌘ Cmd+T |
Go to tab left | ⌘ Cmd+⌥ Opt+ |
Go to tab right | ⌘ Cmd+⌥ Opt+ |
Move tab left | ⌘ Cmd+K, ⌘ Cmd+⇧ Shift+ |
Move tab right | ⌘ Cmd+K, ⌘ Cmd+⇧ Shift+ |
Go back (any file) | Ctrl+- |
Go forward (any file) | Ctrl+⇧ Shift+- |
Switch tabs | Ctrl+Tab |
New scratch file | ⌘ Cmd+N |
Close tab | ⌘ Cmd+W |
Close all tabs | ⌘ Cmd+⇧ Shift+W |
Reopen closed tab | ⌘ Cmd+⇧ Shift+T |
Recent files | ⌘ Cmd+P |
Focus on path breadcrumbs for current file | ⌘ Cmd+⇧ Shift+; |
Delete current file | ⌘ Cmd+⇧ Shift+P, "File Utils: Delete" |
7 VSCode - Panels
Open filesystem panel (explorer) | ⌘ Cmd+⇧ Shift+E |
Open extensions panel | ⌘ Cmd+⇧ Shift+X |
Close left sidebar | ⌘ Cmd+B |
Close bottom panel | ⌘ Cmd+J |
Open settings | ⌘ Cmd+, |
Open keyboard shortcuts | ⌘ Cmd+K, ⌘ Cmd+S |
Lookup shortcut | ⌘ Cmd+K, ⌘ Cmd+S, ⌘ Cmd+⌥ Opt+K |
Toggle right sidebar | ⌘ Cmd+⌥ Opt+B |
Focus bottom editor | ⌘ Cmd+K, ⌘ Cmd+Down |
Was this page helpful?