Skip to main content

Visual Studio Code macOS Keyboard shortcut quick reference.

---
title: Visual Studio Code macOS Keyboard Shortcut Cheatsheet
author: xcad2k
date: October 6, 2022
source: https://github.com/xcad2k/cheat-sheets/blob/main/macos/vscode-macos-shortcuts.md
notoc: false
---

- [MacOS vscode keyboard shortcuts](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf)
- [Howto vscode custom shortcuts](https://code.visualstudio.com/docs/getstarted/keybindings)
- [Learn vscode keyboard shortcuts](https://blog.logrocket.com/learn-these-keyboard-shortcuts-to-become-a-vs-code-ninja/)

## Side Menu

| shortcut  | description          |
| :-------- | :------------------- |
| ⌘ + B     | Hide show side menu  |
| ⌘ + ⇧ + E | Explorer window      |
| ⌘ + ⇧ + F | Find window          |
| ⌘ + ⇧ + J | Find in files window |
| ⌃ + ⇧ + G | Git window           |
| ⌘ + ⇧ + D | Debug window         |
| ⌘ + ⇧ + X | Extension window     |

## Multi-Cursor Editing

| shortcut  | description                                   |
| :-------- | :-------------------------------------------- |
| ⌘ + ⌥ + ↓ | add a new cursor below                        |
| ⌥ + Click | add a new cursor at the mouse click           |
| ⌘ + ⇧ + L | add new cursor behind all instances of a word |

## Split editor

| shortcut | description |
| :------- | :---------- |
| ⌘ + \    | split       |

## Split Window focusing

| shortcut | description                           |
| :------- | :------------------------------------ |
| ⌘ + 0    | explorer panel                        |
| ⌘ + 1    | 1st window split window               |
| ⌘ + 2    | 2nd window split window               |
| ⌃ + ~    | terminal window                       |
| ^ + tab  | switch between tabs                   |
| ⌘ + ~    | switch between VS code editor windows |

## IntelliSense

| shortcut  | description            |
| :-------- | :--------------------- |
| ⌃ + Space | to invoke IntelliSense |

## Line Action

| shortcut  | description                    |
| :-------- | :----------------------------- |
| ⇧ + ⌥ + ↓ | copy the line and insert below |
| ⇧ + ⌥ + ↑ | copy the line and insert above |
| ⌥ + ↓     | move entire line below         |
| ⌥ + ↑     | move entire line above         |
| ⌘ + ⇧ + K | delete entire line             |

## Rename Refactoring

| shortcut                           | description                          |
| :--------------------------------- | :----------------------------------- |
| F2 (Fn + F2)                       | Rename Symbol in the current project |
| Right Mouse Click -> Rename Symbol | Rename Symbol in the current project |

## Formatting

| shortcut      | description            |
| :------------ | :--------------------- |
| ⇧ + ⌥ + F     | format entire document |
| ⌘ + K and ⌘ F | format selected text   |

## Transform selected

| shortcut      | description                     |
| :------------ | :------------------------------ |
| ^ + ⇧ + ⌥ + L | transform selected to lower     |
| ^ + ⇧ + ⌥ + U | transform selected to upper     |
| ^ + ⇧ + ⌥ + S | transform selected to snake     |
| ^ + ⇧ + ⌥ + T | transform selected to titelcase |

## Code Folding

| shortcut    | description   |
| :---------- | :------------ |
| ⌘ + ⌥ + [   | fold          |
| ⌘ + ⌥ + ]   | unfold        |
| ⌘ K and ⌘ 0 | fold all      |
| ⌘ K and ⌘ J | unfold all    |
| ⌘ K and ⌘ 1 | fold 1 level  |
| ⌘ K and ⌘ 2 | fold 2 levels |
| ⌘ K and ⌘ 5 | fold 5 levels |

## Errors and Warnings

| shortcut | description            |
| :------- | :--------------------- | --- |
| F8       | navigate across errors | Î   |