Visual Studio Code Hotkeys Mac



-->

You can navigate in Visual Studio more easily by using the shortcuts in this article. These shortcuts include keyboard and mouse shortcuts as well as text you can enter to help accomplish a task more easily.

For a complete list of command shortcuts, see Default keyboard shortcuts.

Note

Usb tools for mac. This topic applies to Visual Studio on Windows. For Visual Studio for Mac, see Common keyboard shortcuts in Visual Studio for Mac.

Customised (and effective) Visual Studio Code keyboard shortcuts for Mac and Windows 20th May 2020. Since I code on both Windows and Mac, I want my Visual Studio Code shortcuts to be interchangeable on both systems. So I dug deep into Visual Studio Code’s keyboard shortcuts for both systems and made my personal customisations. Running VS Code on Mac Installation. Download Visual Studio Code for Mac. Double-click on the downloaded archive to expand the contents. Drag Visual Studio Code.app to the Applications folder, making it available in the Launchpad. Add VS Code to your Dock by right-clicking on the icon and choosing Options, Keep in Dock. Toolbox – Use the Toolbox Window to display a list of all code snippets. Drag any template from the toolbox into the correct position in the source code: Insert Templates command – There is currently no default key binding set for inserting a template. To create one, browse to Visual Studio Preferences Key Bindings and search for template.

Visual Studio Code Hotkeys Mac

Window management

Visual Studio Code Hotkeys Mac
TaskShortcut
Maximize floating windowDouble-click on title bar
Maximize/minimize windowsWin+Up arrow / Win+Down arrow
Redock floating windowCtrl+double-click on title bar
Move/dock floating windowsWin+Left arrow / Win+Right arrow
Close active documentCtrl+F4
Show open file listCtrl+Alt+Down arrow
Show all floating windowsCtrl+Shift+M
Show jump listWin+Alt+N
Start new instanceWin+Shift+N
Switch between windowsWin+N

Search

TaskShortcut
Solution Explorer searchCtrl+;
Place focus in search box in any tool window (except editor)Alt+` when the tool window has focus
Search Visual StudioCtrl+Q
Search box results filter@opt - Options
@cmd - Commands
@mru - Most recently used
@doc - Open documents
Search in Tools OptionsCtrl+E

Find in the editor

CodeMac
TaskShortcut
Quick FindCtrl+F
Quick Find Next ResultEnter
Quick Find Previous ResultShift+Enter
Quick Find Expand Drop DownAlt+Down arrow
Dismiss FindEsc
Quick ReplaceCtrl+H
Quick Replace - Replace NextAlt+R
Quick Replace - Replace AllAlt+A
Find in FilesCtrl+Shift+F
Replace in FilesCtrl+Shift+H

Code editor

TaskShortcut
Go To AllCtrl+T
Go to recent filesCtrl+T,R
Multi-caret multiple insertion pointsCtrl+Alt+click
Multi-caret add matching selectionShift+Alt+Ins
Format DocumentCtrl+K,D
IntelliSense suggestion modeCtrl+Alt+Space (Toggle)
Force show IntelliSenseCtrl+J
Quick ActionsCtrl+.
Snippet pickerCtrl+K,X or ?,Tab (Visual Basic)
Surround WithCtrl+K,S
Show Quick InfoCtrl+K,I
Navigate ToCtrl+,
Navigate highlighted referencesCtrl+Shift+Up (Previous)
Ctrl+Shift+Down (Next)
Editor zoomCtrl+Shift+> (In)
Ctrl+Shift+< (Out)
Block selectionHold Alt and drag mouse
Shift+Alt+Arrow keys
Move line up/downAlt+Up arrow / Alt+Down arrow
Duplicate lineCtrl+E,V
Expand selectionShift+Alt+=
Contract selectionShift+Alt+-
Go To DefinitionF12
Peek DefinitionAlt+F12
Go To Definition stackCtrl+Shift+8 (Back)
Ctrl+Shift+7 (Forward)
Close the Peek Definition windowEsc
Promote the Peek Definition window to a regular document tabCtrl+Alt+Home
Navigate between multiple Peek Definition windowsCtrl+Alt+- and Ctrl+Alt+=
Navigate between multiple Peek resultsF8 and Shift+F8
Toggle between the code editor window and the Peek Definition windowShift+Esc
Go to enclosing blockCtrl+Alt+Up arrow
Go to next/previous issueAlt+PgUp / Alt+PgDn
Contextual navigation menuAlt+`

Toolbars

TaskShortcut
Add buttonsSelect the toolbar overflow button
Find combo in standard toolbarCtrl+D
Find textbox command modeType >
Create new aliasType alias <new alias> <command> in the Command window

Debugging

Visual
TaskShortcut
Start debuggingF5
Stop debuggingShift+F5
Restart debuggingCtrl+Shift+F5
Step overF10
Step intoF11
Step outShift+F11
Run to cursorCtrl+F10
Set next statementCtrl+Shift+F10
Set and toggle breakpointF9
Disable breakpointCtrl+F9
Immediate windowCtrl+Alt+I
Immediate window command modeType >
Immediate window - clear bufferType cls
Immediate window - print valueType ?varname

Visual Studio Code Open Terminal Shortcut Mac

See also