Vs Code Cheat Sheet Mac
Vs Code Cheat Sheet Mac
edition
presented by Tower — the best Git client for Mac and Windows
Trigger parameter hints ⌘ ⇧ SPACE Add cursors at line ends ⌥ ⇧ I Delete line ⌘ ⇧ K
Go to definition F12 Select all occurrences of selection ⌘ ⇧ L New line above/ ⌘ ENTER /
below current ⌘ ⇧ ENTER
Peek definition ⌥ F12 Undo cursor operation ⌘ U
Editor groups
Activity bar
Status bar
EDITOR MANAGEMENT
Focus 1st, 2nd or 3rd editor group ⌘ 1 /⌘ 2 /⌘ 3 Close all ⌘ K ⌘ W Zen mode ⌘ K Z
Keep preview mode editor open ⌘ K ENTER Open in new editor group ⌘ ENTER Close window/instance ⌘ ⇧ W
EDITOR SPLITS
You can split editors to achieve just about any layout you want. The View → Editor Layout menu
holds some presets like three columns or a two-by-two grid. There are commands for splitting
the current editor in any direction, and dragging-and-dropping the tab of an open file also lets
you create a split in any direction. In addition, here are some ways to manage the editor layout:
⌘ 2 , ⌘ 3 etc. will bring up additional editors, or focus that editor if it’s already opened.
⌥ -clicking a file in the Explorer in the side bar will open the file in a second editor.
⌘ ENTER in the Quick Open file list opens the file in a new editor.
$ TERMINAL
The panel at the bottom of the VS Code interface houses an integrated terminal.
⌘ J toggles the panel, while ⌃ ` focuses and then toggles the terminal.
⌃ ⇧ ` opens a new terminal. You can shift between open terminals using the dropdown in the
upper-right corner of the panel. The terminal can be split, and binding a keyboard shortcut to
the command “View: Toggle Maximized Panel” allows you to temporarily maximize it.
There are also commands available to “Run Selected Text in Active Terminal” and “Run Active
File in Active Terminal”.
Open the keyboard shortcut preferences with the shortcut ⌘ K ⌘ S . Here, you can search for
a command like “add cursor below”, but you can also search for a key binding. For example,
searching for “ctrl shift cmd right” shows the command bound to that shortcut.
The preferences show the keyboard shortcuts with the current keyboard layout. If you switch
your keyboard layout, the shortcuts displayed update accordingly.
You can filter the shortcuts to display only bindings added by the user or default bindings by
typing @source:user or @source:default in the search bar.