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.
Here I am Showing You That How You Can Get & Set Property Using Shortcut In Visual Studio. Write 'prop' as shown in below image: Then it will automatically display intelligence & from that select 'prop' & then press TAB key from your keyboard then it will automatically add a code snippet of get & set property. Visual Studio 2019 shortcuts Quickly add public properties. You can add properties to your classes the quick way by typing prop and then tab tab. In this case were going to make a property and name it hitPoints Quickly populate a full property with public and private members. You can do the exact same thing except type propfull to get the full. 3 Apr 2019 CPOL 2 min read Some useful Visual Studio keyboard shortcuts that are worth memorizing There are literally hundreds of keyboard shortcuts in Visual Studio, and few people have them all memorized, but it is definitely worthwhile to memorize at least a few. With these 20 Visual Studio keyboard shortcuts, developers have easy ways to get more done without lifting a finger off the keyboard. These hotkeys work for Visual Studio 2015 to the latest Visual studio 2019. CTRL+Q for Quick Launch CTRL+Q opens the quick launch so you can search an indexed list of every feature available in Visual Studio. Shortcut Description; Shift-Alt-Enter: Toggles full screen mode: Ctrl-+ Goes back to the previous location in the navigation history. (For example, if you press Ctrl-Home to go to the start of a document, this shortcut will take the cursor back to wherever it was before you pressed Ctrl-Home.) Ctrl-Shift-+ Moves forward in the navigation history.
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.
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.
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 Action | Windows keyboard Shortcut | Mac keyboard Shortcut | Linux keyboard Shortcut |
---|---|---|---|
To Show Command Palette | Ctrl+Shift+P, F1 | ⇧⌘P, F1 | Ctrl+Shift+P, F1 |
To Open or Go to File... | Ctrl+P | ⌘P | Ctrl+P |
New visual code window or instance | Ctrl+Shift+N | ⇧⌘N | Ctrl+Shift+N |
To Close window or instance | Ctrl+Shift+W | ⌘W | Ctrl+Shift+W |
To open User Settings | Ctrl+, | ⌘, | Ctrl+, |
To open Keyboard Shortcuts | Ctrl+K Ctrl+S | ⌘K ⌘S | Ctrl+K Ctrl+S |
Basic Editing Shortcuts:
Command Action | Windows Keyboard Shortcut | Mac Keyboard Shortcut | Linux Keyboard Shortcut |
---|---|---|---|
Cut line (empty selection) | Ctrl+X | ⌘X | Ctrl+X |
Copy line (empty selection) | Ctrl+C | ⌘C | Ctrl+C |
Move line up/down | Alt+ ↑ / ↓ | ⌥↓ / ⌥↑ | Alt+ ↑ / ↓ |
Copy line up/down | Shift+Alt + ↓ / ↑ | ⇧⌥↓ / ⇧⌥↑ | Shift+Alt + ↓ / ↑ |
Delete line | Ctrl+Shift+K | ⇧⌘K | Ctrl+Shift+K |
Insert line below | Ctrl+Enter | ⌘Enter | Ctrl+Enter |
Insert line above | Ctrl+Shift+Enter | ⇧⌘Enter | Ctrl+Shift+Enter |
Jump to matching bracket | Ctrl+Shift+ | ⇧⌘ | Ctrl+Shift+ |
Indent/outdent line | Ctrl+] / [ | ⌘] / ⌘[ | Ctrl+] / [ |
Go to beginning/end of line | Home / End | Home / End | Home / End |
Go to beginning of file | Ctrl+Home | ⌘↑ | Ctrl+Home |
Go to end of file | Ctrl+End | ⌘↓ | Ctrl+End |
Scroll line up/down | Ctrl+↑ / ↓ | ⌃PgUp / ⌃PgDn | Ctrl+↑ / ↓ |
Scroll page up/down | Alt+PgUp / PgDn | ⌘PgUp /⌘PgDn | Alt+PgUp / PgDn |
Fold/unfold region | Ctrl+Shift+ [ / ] | ⌥⌘[ / ⌥⌘] | Ctrl+Shift+ [ / ] |
Fold/unfold all subregions | Ctrl+K Ctrl+ [ / ] | ⌘K ⌘[ / ⌘K ⌘] | Ctrl+K Ctrl+ [ / ] |
Fold/Unfold all regions | Ctrl+K Ctrl+0 / Ctrl+K Ctrl+J | ⌘K ⌘0 / ⌘K ⌘J | Ctrl+K Ctrl+0 / Ctrl+K Ctrl+J |
Add line comment | Ctrl+K Ctrl+C | ⌘K ⌘C | Ctrl+K Ctrl+C |
Remove line comment | Ctrl+K Ctrl+U | ⌘K ⌘U | Ctrl+K Ctrl+U |
Toggle line comment | Ctrl+/ | ⌘/ | Ctrl+/ |
Toggle block comment | Shift+Alt+A | ⇧⌥A | Shift+Alt+A |
Toggle word wrap | Alt+Z | ⌥Z | Alt+Z |
Navigation Shortcuts:
Command Action | Windows Keyboard Shortcut | Mac Keyboard Shortcut | Linux Keyboard Shortcut |
---|---|---|---|
Show all Symbols | Ctrl+T | ⌘T | Ctrl+T |
Go to Line... | Ctrl+G | ⌃G | Ctrl+G |
Go to File... | Ctrl+P | ⌘P | Ctrl+P |
Go to Symbol... | Ctrl+Shift+O | ⇧⌘O | Ctrl+Shift+O |
Show Problems panel | Ctrl+Shift+M | ⇧⌘M | Ctrl+Shift+M |
Go to next/previous error or warning | F8 /Shift+F8 | F8 / ⇧F8 | F8 /Shift+F8 |
Navigate editor group history | Ctrl+Shift+Tab | ⌃⇧Tab | Ctrl+Shift+Tab |
Go back/forward | Alt+ ← / → | ⌃- / ⌃⇧- | Alt+ ← / → |
Toggle Tab moves focus | Ctrl+M | ⌃⇧M | Ctrl+M |
Search and replace Shortcuts:
Command Action | Windows Keyboard Shortcut | Mac Keyboard Shortcut | Linux Keyboard Shortcut |
---|---|---|---|
Find | Ctrl+F | ⌘F | Ctrl+F |
Replace | Ctrl+H | ⌥⌘F | Ctrl+H |
Find next/previous | F3 / Shift+F3 | ⌘G / ⇧⌘G | F3 / Shift+F3 |
Select all occurrences of Find match | Alt+Enter | ⌥Enter | Alt+Enter |
Add selection to next Find match | Ctrl+D | ⌘D | Ctrl+D |
Move last selection to next Find match | Ctrl+K Ctrl+D | ⌘K ⌘D | Ctrl+K Ctrl+D |
Multi-cursor and selection Shortcuts:
Command Action | Windows keyboard Shortcut | Mac keyboard Shortcut | Linux keyboard Shortcut |
---|---|---|---|
Insert cursor | Alt+Click | ⌥ + click | Alt+Click |
Insert cursor above / below | Shift+Alt+ ↑ / ↓ | ⌥⌘↑ / ⌥⌘↓ | Shift+Alt+ ↑ / ↓ |
Undo last cursor operation | Ctrl+U | ⌘U | Ctrl+U |
Insert cursor at end of each line selected | Shift+Alt+I | ⇧⌥I | Shift+Alt+I |
Select current line | Ctrl+I | ⌘I | Ctrl+I |
Select all occurrences of current selection | Ctrl+Shift+L | ⇧⌘L | Ctrl+Shift+L |
Select all occurrences of current word | Ctrl+F2 | ⌘F2 | Ctrl+F2 |
Expand selection | Shift+Alt+→ | ⌃⇧⌘→ | Shift+Alt+→ |
Shrink selection | Shift+Alt+← | ⌃⇧⌘← | Shift+Alt+← |
Column (box) selection | Shift+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 / PgDn | Ctrl+Shift+Alt +PgUp/PgDn |
Rich languages editing Shortcuts:
Command Action | Windows keyboard Shortcut | Mac keyboard Shortcut | Linux keyboard Shortcut |
---|---|---|---|
Trigger suggestion | Ctrl+Space | Ctrl+Space | |
Trigger parameter hints | Ctrl+Shift+Space | Ctrl+Shift+Space | |
Emmet expand abbreviation | Tab | Tab | |
Format document | Shift+Alt+F | Ctrl+Shift+I | |
Format selection | Ctrl+K Ctrl+F | Ctrl+K Ctrl+F | |
Go to Definition | F12 | F12 | |
Peek Definition | Alt+F12 | Ctrl+Shift+F10 | |
Open Definition to the side | Ctrl+K F12 | Ctrl+K F12 | |
Quick Fix | Ctrl+. | Ctrl+. | |
Show References | Shift+F12 | Shift+F12 | |
Rename Symbol | F2 | F2 | |
Trim trailing whitespace | Ctrl+K Ctrl+X | Ctrl+K Ctrl+X | |
Change file language | Ctrl+K M | Ctrl+K M |
Editor management Shortcuts:
Command Action | Windows keyboard Shortcut | Mac keyboard Shortcut | Linux keyboard Shortcut |
---|---|---|---|
Close editor | Ctrl+F4, Ctrl+W | ⌘W | Ctrl+W |
Close folder | Ctrl+K F | ⌘K F | Ctrl+K F |
Split editor | Ctrl+ | ⌘ | Ctrl+ |
Focus into 1 st, 2nd or 3rd editor group | Ctrl+ 1 / 2 / 3 | ⌘1 / ⌘2 / ⌘3 | Ctrl+ 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 Shortcut | Mac keyboard Shortcut | Linux keyboard Shortcut |
---|---|---|---|
New File | Ctrl+N | ⌘N | Ctrl+N |
Open File... | Ctrl+O | ⌘O | Ctrl+O |
Save | Ctrl+S | ⌘S | Ctrl+S |
Save As... | Ctrl+Shift+S | ⇧⌘S | Ctrl+Shift+S |
Save All | Ctrl+K S | ⌥⌘S | Ctrl+K S |
Close / Close All | Ctrl+F4 / Ctrl+K Ctrl+W | ⌘W / ⌘K ⌘W | Ctrl+W / Ctrl+K Ctrl+W |
Reopen closed editor | Ctrl+Shift+T | ⇧⌘T | Ctrl+Shift+T |
Keep preview mode editor open | Ctrl+K Enter | ⌘K Enter | Ctrl+K Enter |
Open next | Ctrl+Tab | ⌃Tab | Ctrl+Tab |
Open previous | Ctrl+Shift+Tab | ⌃⇧Tab | Ctrl+Shift+Tab |
Copy path of active file | Ctrl+K P | ⌘K P | Ctrl+K P |
Reveal active file in Explorer | Ctrl+K R | ⌘K R | Ctrl+K R |
Show active file in new window/instance | Ctrl+K O | ⌘K O | Ctrl+K O |
Display Shortcuts:
Command Action | Windows keyboard Shortcut | Mac keyboard Shortcut | Linux keyboard Shortcut |
---|---|---|---|
Toggle full screen | F11 | ⌃⌘F | F11 |
Toggle editor layout (horizontal/vertical) | Shift+Alt+1 | ⌥⌘1 | Shift+Alt+1 |
Zoom in/out | Ctrl+ = / - | ⌘= / ⇧⌘- | Ctrl+ = / - |
Toggle Sidebar visibility | Ctrl+B | ⌘B | Ctrl+B |
Show Explorer / Toggle focus | Ctrl+Shift+E | ⇧⌘E | Ctrl+Shift+E |
Show Search | Ctrl+Shift+F | ⇧⌘F | Ctrl+Shift+F |
Show Source Control | Ctrl+Shift+G | ⌃⇧G | Ctrl+Shift+G |
Show Debug | Ctrl+Shift+D | ⇧⌘D | Ctrl+Shift+D |
Show Extensions | Ctrl+Shift+X | ⇧⌘X | Ctrl+Shift+X |
Replace in files | Ctrl+Shift+H | ⇧⌘H | Ctrl+Shift+H |
Toggle Search details | Ctrl+Shift+J | ⇧⌘J | Ctrl+Shift+J |
Show Output panel | Ctrl+Shift+U | ⇧⌘U | Ctrl+K Ctrl+H |
Open Markdown preview | Ctrl+Shift+V | ⇧⌘V | Ctrl+Shift+V |
Open Markdown preview to the side | Ctrl+K V | ⌘K V | Ctrl+K V |
Zen Mode (Esc Esc to exit) | Ctrl+K Z | ⌘K Z | Ctrl+K Z |
Debug Shortcuts:
Command Action | Windows keyboard Shortcut | Mac keyboard Shortcut | Linux keyboard Shortcut |
---|---|---|---|
Toggle breakpoint | F9 | F9 | F9 |
Start/Continue | F5 | F5 | F5 |
Stop | Shift+F5 | ⇧F5 | Shift+F5 |
Step into/out | F11 / Shift+F11 | F11 / ⇧F11 | F11 / Shift+F11 |
Step over | F10 | F10 | F10 |
Show hover | Ctrl+K Ctrl+I | ⌘K ⌘I | Ctrl+K Ctrl+I |
Integrated terminal Shortcuts:
Command Action | Windows keyboard Shortcut | Mac keyboard Shortcut | Linux keyboard Shortcut |
---|---|---|---|
Show integrated terminal | Ctrl+` | ⌃` | Ctrl+` |
Create new terminal | Ctrl+Shift+` | ⌃⇧` | Ctrl+Shift+` |
Copy selection | Ctrl+C | ⌘C | Ctrl+C |
Paste into active terminal | Ctrl+V | ⌘V | Ctrl+V |
Scroll up/down | Ctrl+↑ / ↓ | ⌘↑ / ↓ | Ctrl+↑ / ↓ |
Scroll page up/down | Shift+PgUp / PgD | PgUp / PgDn | Shift+PgUp / PgD |
Scroll to top/bottom | Ctrl+Home / End | ⌘Home / End | Ctrl+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 wordVisual Studio 2019 All Shortcuts Cheat Sheet
Visual Studio shortcut keys - You will learn here what is shortcut keys ? How you can become professional web developer or designer by adding these shortcut keys in your daily work routine.
Visual Studio Keyboard Shortcuts
Most of the time we use our keyboard for coding instead of using mouse. But sometimes during coding we use mouse for other kind of commands like copy, paste, debugging etc. Visual studio provides some key combination which help us to run these commands by keyboard instead of using mouse by using Alt, Shift, Control combination. like for copy Ctrl+C, Paste Ctrl+V etc. Such combination of keys is called keyboard shortcuts.
If you are not beginners, I will suggest to read my next article Visual Studio shortcut keys for Professionals too.
In this article we are going to know visual studio keyboard shortcuts cheat sheet of such 30 keys combination, which is very easy to learn and use.
# | Shortcut | Command |
---|---|---|
1 | Ctrl+Shift+N | New Project... |
2 | Ctrl+O | Open File... |
3 | Ctrl+S | Save Selected File |
4 | Alt+F4 | Exit |
5 | Ctrl+G | Go To Line... |
6 | Ctrl+F | Find... |
7 | Ctrl+H | Replace... |
8 | Double Click | Select Word |
9 | Tripple Click | Select Line |
10 | Shift + Arrow | Select By Char |
11 | Ctrl+Shift+U | Make Uppercase |
12 | Ctrl+U | Make Lowercase |
13 | Ctrl+Z | Undo |
14 | Ctrl+Y | Redo |
15 | Ctrl+A | Select All |
16 | Ctrl+X | Cut |
17 | Ctrl+C | Copy |
18 | Ctrl+V | Paste |
19 | Del | Delete |
20 | F7 | Code (.cs or .vb) |
21 | Shift+F7 | Designer (Asp.net) |
22 | F5 | Start Debugging |
23 | F11 | Step Into |
24 | F10 | Step Over |
25 | Ctrl+Break | Cancel |
26 | F9 | Toggle Break Point |
27 | F12 | Go To Definition |
28 | Ctrl+Alt+L | Solution Explorer |
29 | F4 | Properties Window |
30 | Ctrl+Alt+X | Tool Bar |
Visual Studio shortcut keys for beginners is very general and easy to learn shortcuts similar to Microsoft world shortcuts, you must start using these shortcuts to become more productive.