0% found this document useful (0 votes)
608 views2 pages

Vs Code Cheat Sheet Mac

This document provides a cheat sheet of keyboard shortcuts for Visual Studio Code on macOS. It includes shortcuts for selecting and navigating code, editing code, file navigation, search, views, tools/terminal, and editor management. Sections also cover using editor splits, the integrated terminal, and customizing keyboard shortcuts.

Uploaded by

Harsh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
608 views2 pages

Vs Code Cheat Sheet Mac

This document provides a cheat sheet of keyboard shortcuts for Visual Studio Code on macOS. It includes shortcuts for selecting and navigating code, editing code, file navigation, search, views, tools/terminal, and editor management. Sections also cover using editor splits, the integrated terminal, and customizing keyboard shortcuts.

Uploaded by

Harsh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

VISUAL STUDIO CODE Cheat Sheet macOS

edition
presented by Tower — the best Git client for Mac and Windows

GENERAL SELECTING AND NAVIGATING CODE


Show command palette ⌘ ⇧ P Select line ⌘ L

Edit keyboard shortcuts ⌘ K ⌘ S Expand/shrink selection ⌘ ⇧ ⌃ → /


⌘ ⇧ ⌃ ←
EDITING CODE
SMART CODE FEATURES Add cursor above/below ⌘ ⌥ ↑ / Move line up/down ⌥ ↑ /⌥ ↓
⌘ ⌥ ↓
Trigger suggestion ⌃ SPACE Copy line up/down ⌥ ⇧ ↑ /⌥ ⇧ ↓

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

Show references ⇧ F12 Skip currently selected word ⌘ K ⌘ D Indent/outdent line ⌘ ] /⌘ [

Rename symbol F2 Go back/forward ⌃ - / ⌃ ⇧ - Join line with next ⌃ J

Format document ⌥ ⇧ F Go to line ⌃ G Toggle line comment ⌘ /

Format selection ⌘ K ⌘ F Go to symbol ⌘ ⇧ O Toggle block comment ⌥ ⇧ A

Change file language ⌘ K M Focus breadcrumbs ⌘ ⇧ . Trim trailing whitespace ⌘ K ⌘ X

Editor groups

Activity bar

Side bar $ Panel with


terminal

Status bar

EDITOR MANAGEMENT
Focus 1st, 2nd or 3rd editor group ⌘ 1 /⌘ 2 /⌘ 3 Close all ⌘ K ⌘ W Zen mode ⌘ K Z

Open next/previous editor ⌘ ⌥ → /⌘ ⌥ ← Reopen closed editor ⌘ ⇧ T New window/instance ⌘ ⇧ N

Keep preview mode editor open ⌘ K ENTER Open in new editor group ⌘ ENTER Close window/instance ⌘ ⇧ W

FILE NAVIGATION SEARCH VIEW


Open recent ⌃ R Find ⌘ F Toggle side bar ⌘ B

Quick open ⌘ P Replace ⌘ ⌥ F Show/focus explorer ⌘ ⇧ E

Go to symbol in workspace ⌘ T Replace in files ⌘ ⇧ H Show search ⌘ ⇧ F

Copy path of file ⌘ K P Find next/previous ⌘ G / ⌘ ⇧ G Show source control ⌃ ⇧ G

Reveal file in Finder ⌘ K R Show debug ⌘ ⇧ D

TOOLS AND TERMINAL Show extensions ⌘ ⇧ X

Run build task ⌘ ⇧ B Toggle panel ⌘ J

Show/focus integrated terminal ⌃ ` Open Markdown preview ⌘ ⇧ V


The best Git client
Create new terminal ⌃ ⇧ ` Toggle word wrap ⌥ Z
for Mac & Windows
Free 30-day trial available
at www.git-tower.com
VISUAL STUDIO CODE Cheat Sheet macOS
edition
presented by Tower — the best Git client for Mac and Windows

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”.

⌘ KEYBOARD SHORTCUT PREFERENCES

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.

The best Git client for Mac & Windows


Free 30-day trial available at www.git-tower.com

You might also like