Visual Studio For Mac Key Bindings

Visual Studio Code keyboard Shortcuts helps developers maximize their productivity by allowing them to work faster and more efficiently. Here I am listing down all the keyboard shortcuts and cheats of Visual Studio Code editor for Windows, Mac and Linux Operating systems. Give a shot.

  1. Visual Studio For Mac Key Bindings Download
  2. Visual Studio For Mac Keyboard Shortcuts
  3. Visual Studio Mac Keyboard Shortcuts

Visual Studio Code – and the caption is Code Editing Redefined

It does exactly what it quotes. I can say this visual studio code is a combination of classic lightweight text editor and Microsoft visual studio IDE.

Using The Command Line. Press the Clone or download button in the top right. Copy the URL (link) Open the command line and change directory to where you wish to clone to. Type 'git clone' followed by URL in step 2. $ git clone https://github.com/FredHappyface/VSCode.OSKeybindings. This project tries to follow the Mac OS X 10.5+ keybindings as closely as possible. As new UI elements and IDE features are added, JetBrains may add and remove keybindings to better match their evolving feature set. If you find that your muscle memory is getting in the way of a new binding, make a copy of this keymap for your own custom shortcuts.

It’s free, open-source and cross-platform.

Most of the developers around the world started using Visual Studio Code. It’s good to know some useful keyboard shortcuts for this beautiful editor.

The good thing is if you are familiar with other text editors like sublime, vim, atom, eclipse etc. You can install corresponding editor keyboard bindings through extensions. there are lots of extensions available for keyboard mappings

Open Visual Studio Code and

Navigate to File->Preferences->Keymap Extensions install your choice of keymappings.

You can press Ctrl+Shift+P or F1 (windows and Linux users) and ⇧⌘P or F1 (Mac users) to open the command Palette and search for required keyboard shortcuts.

Studio

And also we can add our own keyboard bindings, at the end of this post I will explain how to change keyboard shortcuts for visual studio code. We can customize bindings for language types also.

General Shortcuts:

Command ActionWindows keyboard ShortcutMac keyboard ShortcutLinux keyboard Shortcut
To Show Command PaletteCtrl+Shift+P, F1⇧⌘P, F1Ctrl+Shift+P, F1
To Open or Go to File...Ctrl+P⌘PCtrl+P
New visual code window or instance
Ctrl+Shift+N⇧⌘NCtrl+Shift+N
To Close window or instanceCtrl+Shift+W⌘WCtrl+Shift+W
To open User SettingsCtrl+,⌘,Ctrl+,
To open Keyboard Shortcuts
Ctrl+K Ctrl+S⌘K ⌘SCtrl+K Ctrl+S

Basic Editing Shortcuts:

Command ActionWindows Keyboard ShortcutMac Keyboard ShortcutLinux Keyboard Shortcut
Cut line (empty selection)Ctrl+X⌘XCtrl+X
Copy line (empty selection)
Ctrl+C⌘CCtrl+C
Move line up/down
Alt+ ↑ / ↓⌥↓ / ⌥↑Alt+ ↑ / ↓
Copy line up/down
Shift+Alt + ↓ / ↑⇧⌥↓ / ⇧⌥↑Shift+Alt + ↓ / ↑
Delete lineCtrl+Shift+K⇧⌘KCtrl+Shift+K
Insert line below
Ctrl+Enter⌘EnterCtrl+Enter
Insert line above
Ctrl+Shift+Enter⇧⌘EnterCtrl+Shift+Enter
Jump to matching bracketCtrl+Shift+⇧⌘Ctrl+Shift+
Indent/outdent lineCtrl+] / [⌘] / ⌘[Ctrl+] / [
Go to beginning/end of lineHome / EndHome / EndHome / End
Go to beginning of fileCtrl+Home⌘↑Ctrl+Home
Go to end of file
Ctrl+End⌘↓Ctrl+End
Scroll line up/downCtrl+↑ / ↓⌃PgUp / ⌃PgDnCtrl+↑ / ↓
Scroll page up/down
Alt+PgUp / PgDn⌘PgUp /⌘PgDnAlt+PgUp / PgDn
Fold/unfold regionCtrl+Shift+ [ / ]⌥⌘[ / ⌥⌘]Ctrl+Shift+ [ / ]
Fold/unfold all subregionsCtrl+K Ctrl+ [ / ]⌘K ⌘[ / ⌘K ⌘]Ctrl+K Ctrl+ [ / ]
Fold/Unfold all regionsCtrl+K Ctrl+0 /
Ctrl+K Ctrl+J
⌘K ⌘0 / ⌘K ⌘JCtrl+K Ctrl+0 /
Ctrl+K Ctrl+J
Add line commentCtrl+K Ctrl+C⌘K ⌘CCtrl+K Ctrl+C
Remove line comment
Ctrl+K Ctrl+U⌘K ⌘UCtrl+K Ctrl+U
Toggle line comment
Ctrl+/⌘/Ctrl+/
Toggle block commentShift+Alt+A⇧⌥AShift+Alt+A
Toggle word wrapAlt+Z⌥ZAlt+Z

Navigation Shortcuts:

Command ActionWindows Keyboard ShortcutMac Keyboard ShortcutLinux Keyboard Shortcut
Show all Symbols
Ctrl+T⌘TCtrl+T
Go to Line...Ctrl+G⌃GCtrl+G
Go to File...Ctrl+P⌘PCtrl+P
Go to Symbol...
Ctrl+Shift+O⇧⌘OCtrl+Shift+O
Show Problems panel
Ctrl+Shift+M⇧⌘MCtrl+Shift+M
Go to next/previous error or warning
F8 /Shift+F8F8 / ⇧F8F8 /Shift+F8
Navigate editor group historyCtrl+Shift+Tab⌃⇧TabCtrl+Shift+Tab
Go back/forward
Alt+ ← / →⌃- / ⌃⇧-Alt+ ← / →
Toggle Tab moves focus
Ctrl+M⌃⇧MCtrl+M

Search and replace Shortcuts:

Command ActionWindows Keyboard ShortcutMac Keyboard ShortcutLinux Keyboard Shortcut
Find
Ctrl+F⌘FCtrl+F
Replace
Ctrl+H⌥⌘FCtrl+H
Find next/previousF3 / Shift+F3⌘G / ⇧⌘GF3 / Shift+F3
Select all occurrences of Find match
Alt+Enter⌥EnterAlt+Enter
Add selection to next Find matchCtrl+D⌘DCtrl+D
Move last selection to next Find match
Ctrl+K Ctrl+D⌘K ⌘DCtrl+K Ctrl+D

Multi-cursor and selection Shortcuts:

Bindings
Command ActionWindows keyboard ShortcutMac keyboard ShortcutLinux keyboard Shortcut
Insert cursorAlt+Click⌥ + clickAlt+Click
Insert cursor above / belowShift+Alt+ ↑ / ↓⌥⌘↑ / ⌥⌘↓Shift+Alt+ ↑ / ↓
Undo last cursor operationCtrl+U⌘UCtrl+U
Insert cursor at end of each line selectedShift+Alt+I⇧⌥IShift+Alt+I
Select current line
Ctrl+I⌘ICtrl+I
Select all occurrences of current selection
Ctrl+Shift+L⇧⌘LCtrl+Shift+L
Select all occurrences of current word
Ctrl+F2⌘F2Ctrl+F2
Expand selectionShift+Alt+→⌃⇧⌘→Shift+Alt+→
Shrink selection
Shift+Alt+←⌃⇧⌘←Shift+Alt+←
Column (box) selectionShift+Alt +
(drag mouse) Or
Ctrl+Shift+Alt
+ ↑ / ↓
⇧⌥ + (drag mouse) or ⇧⌥⌘↑ / ↓Shift+Alt +
(drag mouse) or Ctrl+Shift+Alt
+ ↑ / ↓
Column (box) selection page up/down
Ctrl+Shift+Alt
+PgUp/PgDn
⇧⌥⌘PgUp / PgDnCtrl+Shift+Alt
+PgUp/PgDn

Rich languages editing Shortcuts:

Command Action
Windows keyboard ShortcutMac keyboard ShortcutLinux keyboard Shortcut
Trigger suggestionCtrl+SpaceCtrl+Space
Trigger parameter hintsCtrl+Shift+SpaceCtrl+Shift+Space
Emmet expand abbreviationTabTab
Format document
Shift+Alt+FCtrl+Shift+I
Format selection
Ctrl+K Ctrl+FCtrl+K Ctrl+F
Go to DefinitionF12F12
Peek DefinitionAlt+F12Ctrl+Shift+F10
Open Definition to the side
Ctrl+K F12Ctrl+K F12
Quick Fix
Ctrl+.Ctrl+.
Show References
Shift+F12Shift+F12
Rename SymbolF2F2
Trim trailing whitespace
Ctrl+K Ctrl+XCtrl+K Ctrl+X
Change file language
Ctrl+K MCtrl+K M

Editor management Shortcuts:

Command Action
Windows keyboard ShortcutMac keyboard ShortcutLinux keyboard Shortcut
Close editor
Ctrl+F4, Ctrl+W⌘WCtrl+W
Close folderCtrl+K F⌘K FCtrl+K F
Split editorCtrl+Ctrl+
Focus into 1
st, 2nd or 3rd editor group
Ctrl+ 1 / 2 / 3⌘1 / ⌘2 / ⌘3Ctrl+ 1 / 2 / 3
Focus into previous/next editor group
Ctrl+K Ctrl+ ←/→⌘K ⌘← / ⌘K ⌘→Ctrl+K Ctrl+ ←/→
Move editor left/right
Ctrl+Shift+PgUp / PgDn⌘K ⇧⌘← / ⌘K ⇧⌘→Ctrl+Shift+PgUp / PgDn
Move active editor group
Ctrl+K ← / →⌘K ← / ⌘K →Ctrl+K ← / →

File management Shortcuts:

Command Action
Windows keyboard ShortcutMac keyboard ShortcutLinux keyboard Shortcut
New FileCtrl+N⌘NCtrl+N
Open File...
Ctrl+O⌘OCtrl+O
Save
Ctrl+S⌘SCtrl+S
Save As...Ctrl+Shift+S⇧⌘SCtrl+Shift+S
Save All
Ctrl+K S⌥⌘SCtrl+K S
Close / Close AllCtrl+F4 / Ctrl+K Ctrl+W⌘W / ⌘K ⌘WCtrl+W / Ctrl+K Ctrl+W
Reopen closed editor
Ctrl+Shift+T⇧⌘TCtrl+Shift+T
Keep preview mode editor open
Ctrl+K Enter⌘K EnterCtrl+K Enter
Open nextCtrl+Tab⌃TabCtrl+Tab
Open previousCtrl+Shift+Tab⌃⇧TabCtrl+Shift+Tab
Copy path of active fileCtrl+K P⌘K PCtrl+K P
Reveal active file in Explorer
Ctrl+K R⌘K RCtrl+K R
Show active file in new window/instance
Ctrl+K O⌘K OCtrl+K O

Display Shortcuts:

Command Action
Windows keyboard ShortcutMac keyboard ShortcutLinux keyboard Shortcut
Toggle full screen
F11⌃⌘FF11
Toggle editor layout (horizontal/vertical)Shift+Alt+1⌥⌘1Shift+Alt+1
Zoom in/out
Ctrl+ = / -⌘= / ⇧⌘-Ctrl+ = / -
Toggle Sidebar visibilityCtrl+B⌘BCtrl+B
Show Explorer / Toggle focus
Ctrl+Shift+E⇧⌘ECtrl+Shift+E
Show SearchCtrl+Shift+F⇧⌘FCtrl+Shift+F
Show Source ControlCtrl+Shift+G⌃⇧GCtrl+Shift+G
Show Debug
Ctrl+Shift+D⇧⌘DCtrl+Shift+D
Show Extensions
Ctrl+Shift+X⇧⌘XCtrl+Shift+X
Replace in filesCtrl+Shift+H⇧⌘HCtrl+Shift+H
Toggle Search details
Ctrl+Shift+J⇧⌘JCtrl+Shift+J
Show Output panelCtrl+Shift+U⇧⌘UCtrl+K Ctrl+H
Open Markdown previewCtrl+Shift+V⇧⌘VCtrl+Shift+V
Open Markdown preview to the sideCtrl+K V⌘K VCtrl+K V
Zen Mode (Esc Esc to exit)Ctrl+K Z⌘K ZCtrl+K Z

Debug Shortcuts:

Command Action
Windows keyboard ShortcutMac keyboard ShortcutLinux keyboard Shortcut
Toggle breakpointF9F9F9
Start/ContinueF5F5F5
StopShift+F5⇧F5Shift+F5
Step into/outF11 / Shift+F11F11 / ⇧F11F11 / Shift+F11
Step overF10F10F10
Show hoverCtrl+K Ctrl+I⌘K ⌘ICtrl+K Ctrl+I

Integrated terminal Shortcuts:

Command Action
Windows keyboard ShortcutMac keyboard ShortcutLinux keyboard Shortcut
Show integrated terminalCtrl+`⌃`Ctrl+`
Create new terminalCtrl+Shift+`⌃⇧`Ctrl+Shift+`
Copy selectionCtrl+C⌘CCtrl+C
Paste into active terminal
Ctrl+V⌘VCtrl+V
Scroll up/down
Ctrl+↑ / ↓⌘↑ / ↓Ctrl+↑ / ↓
Scroll page up/down
Shift+PgUp / PgDPgUp / PgDnShift+PgUp / PgD
Scroll to top/bottomCtrl+Home / End⌘Home / EndCtrl+Home / End

Changing Keyboard Shortcuts for Visual Studio Code:

To change the keyboard shortcuts for visual studio code follow the below steps

Open Visual Studio Code and navigate to File>>Preferences>>Keyboard Shortcut

Click on edit keybindings.json You will see two files Default bindings and keybindings.json side by side as shown below.

And now click on define keybindings

I am adding “Ctrl+a” shortcut to open a file by adding below json setting in keybindings.json file

And property “when” is optional. For instance, The new command to open a file Ctrl+a applicable only when language is typescript.

Now Ctrl+a and Ctrl+o both can be used to open a file (If the language is typescript).

Happy Coding….

Wait before leaving.why can’t you follow me on twitter or be a friend on Facebook or linkedn to get in touch with me.

Spread the word
-->

For information about keyboard accessibility, see How to: Use Keyboard Navigation.

You can access a variety of commands in Visual Studio for Mac by using the appropriate keyboard shortcut. This document lists the default shortcuts for the Visual Studio for Mac key binding scheme. For more information about how to change the key binding scheme, see Customizing the IDE. You can also customize shortcuts for a command using the Visual Studio for Mac > Preferences menu item and choosing Environment > Key Bindings in the Preferences window.

Tip

For

The keyboard shortcuts displayed in this document, and the key binding preferences in Visual Studio for Mac, are presented using the symbols commonly used in macOS. If you are unsure of a symbol, review the macOS key symbols loopkup table.

Downloadable quick ref pdfs

We have compiled the most used, and most useful, keyboard shortcuts into a downloadable pdf file. We have two versions,one that shows shortcuts for Visual Studio for Mac, and a version that shows Visual Studio shorts side-by-side for usersthat have prior experience with Visual Studio when using Windows.

Code Navigation

CommandsKeyboard shortcuts
Find References⇧⌘R, F12
Go to Declaration⌘D, F12
Next Error⌥⇧⇟, ⇧⌘F12
Next Issue in File⌥⇟
Previous Error⌥⇧⇞
Previous Issue in File⌥⇞

Debug

CommandsKeyboard shortcuts
Enable or Disable Breakpoint⌥⌘/, ⌘F9
Pause⌥⌘P, ⌥⌘L5
Remove All Breakpoints⇧⌘F9
Run To Cursor⌘F10
Set Next Statement⇧⌘F10
Show Next Statement⌥*
Step Into⇧⌘I, ⌘F11
Step Out⇧⌘U, ⇧⌘F11
Step Over⇧⌘O, F10
Toggle Breakpoint, F9
View Breakpoints⌥⌘B

Designer

Visual Studio For Mac Key Bindings Download

CommandsKeyboard shortcuts
Switch between related files⌃⌘↑

Edit

CommandsKeyboard shortcuts
Constraint Editing Mode⌘E
Copy⌘C
Cut⌘X
Delete⌘⌫
Format Document⌃I
Indent Selection⌘]
Paste⌘V
Preferences⌘,
Redo⇧⌘Z
Rename⌘R, F2
Select All⌘A
Show Code Generation⌘I
Toggle All Folds⌥⇧⌘↑
Toggle Definitions⌥⇧⌘↓
Toggle Fold⌥⇧⌘←
Toggle Line Comment(s)⌘/
Undo⌘Z
Unindent Selection⌘[
Update Frame from Constraints⇧⌘R

F# Integration

Visual studio for mac keyboard shortcuts
CommandsKeyboard shortcuts
Clear F# Interactive⌃⌥C
F# Interactive⌃⌥F
Restart F# Interactive⌃⌥R
Send line to F# Interactive⌃⌥L
Send references to F# Interactive⌃⌥P
Send selection to F# Interactive⌃⏎

File

CommandsKeyboard shortcuts
Close All⇧⌘W
Close File⌘W
Close Workspace⌥⌘W
New File⌘N
New Solution⇧⌘N
Open⌘O
Print⌘P
Quit⌘Q
Revert⌘U
Save⌘S
Save All⇧⌘S

Help

CommandsKeyboard shortcuts
API Documentation⌥⌘?
Unity API Reference⌘'

Visual Studio For Mac Keyboard Shortcuts

Other

CommandsKeyboard shortcuts
Implement Unity Messages⇧⌘M
Inspect⌥⌘I

Project

CommandsKeyboard shortcuts
Add Files⌥⌘A
Build⌘K, ⇧F6
Build All⌘B, F6
Clean⇧⌘K
Rebuild⌃⌘K
Rebuild All⌃⌘B
Start Debugging⌘⏎, F5
Start Without Debugging⌥⌘⏎, ⌃F5
Stop⇧⌘⏎, ⇧F5

Refactoring

CommandsKeyboard shortcuts
Import Symbol⌃⌥␣
Quick Fix⌥⏎

Search

CommandsKeyboard shortcuts
Command⇧⌘P
Find in Files⇧⌘F
Find Next⌘G, F3
Find Next Like Selection⌘E, ⌘F3
Find Previous⇧⌘G, ⇧F3
Find Previous Like Selection⇧⌘F3
Find⌘F
Go to File⇧⌘D
Go to Line⌘L
Go to Type⇧⌘T
Navigate To⌘.
Replace in Files⌥⇧⌘F
Replace⌥⌘F
Visual studio for mac key bindings for beginners

Text Editor

CommandsKeyboard shortcuts
Complete Word⌃␣
Delete left character⌃H
Delete next subword⌃⌦
Delete next word⌥⌦
Delete previous subword⌃⌫
Delete previous word⌥⌫
Delete right character⌃D
Delete to end of line⌃K
Dynamic abbrev⌃/
Expand selection⌥⇧↓
Expand selection⌥⇧↑
Expand selection to document end⇧⌘↓, ⇧⌘↘
Expand selection to document start⇧⌘↑, ⇧⌘↖
Expand selection to line end⇧↘, ⇧⌘→
Expand selection to line start⇧↖, ⇧⌘←
Expand selection to next line⇧↓
Expand selection to next word⌥⇧→
Expand selection to page down⇧⇟
Expand selection to page up⇧⇞
Expand selection to previous line⇧↑
Expand selection to previous word⌥⇧←
Expand selection to the left⇧←
Expand selection to the right⇧→
Find caret⌘|
Go left one character⌃B
Go right one character⌃F
Go to beginning of document⌘↑
Go to beginning of line⌘←, ⌃A
Go to end of document⌘↓
Go to end of line⌘→, ⌃E
Go to Matching Brace⇧⌘
Go to next line⌃N
Go to next word⌥→
Go to previous line⌃P
Go to previous word⌥←
Insert line break after the caret⌃O
Move caret to EOL and insert new line⇧⏎
Move the line or highlighted selection down⌥↓
Move the line or highlighted selection up⌥↑
Move to next usage⌃⌥⌘↓
Move to prev usage⌃⌥⌘↑
Show Parameter List⌃⇧␣
Show quick info⌘F1
Show Scopes⌥⇧⌘P
Transpose characters⌃T
Wrap with <div>⌥⇧W

View

CommandsKeyboard shortcuts
Center and Focus Document⌃L
Focus DocumentF7
Full Screen⌃⌘F
Move to Next Notebook⌥⌘→
Move to Previous Notebook⌥⌘←
Navigate Back⌃⌘←
Navigate Forward⌃⌘→
Normal Size⌘0
One Editor Column⌥⌘1
Show Next⌥⌘↓, F8
Show Previous⌥⌘↑, ⇧F8
Two Editor Columns⌥⌘2
Zoom In⌘+, ⌘=
Zoom Out⌘-, ⌘_

Window

CommandsKeyboard shortcuts
Activate 1⌘1
Activate 2⌘2
Activate 3⌘3
Activate 4⌘4
Activate 5⌘5
Activate 6⌘6
Activate 7⌘7
Activate 8⌘8
Activate 9⌘9
Hide Others⌥⌘H
Hide Visual Studio⌘H
Minimize⌘M
Next Document⌘}, ⌘F6
Previous Document⌘{, ⇧⌘F6
Switch to next document⌃⇥
Switch to next tool window⌃⌥⇥
Switch to previous document⌃⇧⇥
Switch to previous tool window⌃⌥⇧⇥

macOS key symbols lookup

SymbolKey
Command (cmd)
Option (alt)
Shift
Control (ctrl)
Page Up (Pg Up)
Page Down (Pg Dn)
Delete (Backspace)
Forward Delete
Return
←→↑↓Arrow Keys
Home
End
Space Bar
Tab

Visual Studio Mac Keyboard Shortcuts

See also