A comparison of Visual Studio and Visual Studio code shortcuts

Visual Studio Vs Visual Studio code

Most developers will often brag about not needing a mouse (some will even go as far as to say they don’t need a keyboard) but there is some truth to not needing a mouse as shortcuts are the name of the game for making tedious and repeatable tasks , a bit faster and more intuitive. Being able to execute a range of shortcuts in your IDE will truly take you to the next level of your craft and I would say learning how to make use of these shortcut keys was the first real step I took to becoming more senior in my stack.

I’ve recently had the challenge of having to do development on Visual Studio and anyone that knows me will tell you that I am a menace at peddling VSCODE, I’ve used it for close to 8 years now and I’ve learnt how to be incredibly efficient at setting it up to really supercharge my software development skills.

Moving to visual studio , its bloated grandfather, was a real challenge for me as a lot of the shortcuts and extensions I’d gotten used to , weren’t really available. I decided to compile this blog in order to try and figure out how to be as efficient on visual studio as I am in vscode and I hope it helps you if you have to make that transition.

Visual Studio and Visual Studio Code have many shortcuts that are similar, due to their shared lineage, but there are some differences given that they are distinct products with different sets of features and design philosophies. Here’s a comparison of some commonly used shortcuts between the two:

File Operations

OperationVisual StudioVisual Studio Code
New FileCtrl + NCtrl + N
Open FileCtrl + OCtrl + O
SaveCtrl + SCtrl + S
Save AllCtrl + Shift + SCtrl + K, S

Editing

OperationVisual StudioVisual Studio Code
CutCtrl + XCtrl + X
CopyCtrl + CCtrl + C
PasteCtrl + VCtrl + V
UndoCtrl + ZCtrl + Z
RedoCtrl + YCtrl + Y
Duplicate LineCtrl + E, VAlt + Shift + Down Arrow
Comment LineCtrl + K, Ctrl + CCtrl + /
Uncomment LineCtrl + K, Ctrl + UCtrl + /
Format DocumentCtrl + K, Ctrl + DShift + Alt + F
Go to DefinitionF12F12
Peek DefinitionAlt + F12Alt + F12
Rename SymbolCtrl + R, RF2
Show Command PaletteN/ACtrl + Shift + P

Search and Replace

OperationVisual StudioVisual Studio Code
FindCtrl + FCtrl + F
ReplaceCtrl + HCtrl + H
Find in FilesCtrl + Shift + FCtrl + Shift + F
Replace in FilesCtrl + Shift + HCtrl + Shift + H
Go to LineCtrl + GCtrl + G

Window and Editor Management

OperationVisual StudioVisual Studio Code
Open New WindowN/ACtrl + Shift + N
Close WindowCtrl + F4Ctrl + W
Split EditorN/ACtrl + \
Next TabCtrl + TabCtrl + Tab
Previous TabCtrl + Shift + TabCtrl + Shift + Tab
Close EditorCtrl + F4Ctrl + W

Debugging

OperationVisual StudioVisual Studio Code
Start DebuggingF5F5
Stop DebuggingShift + F5Shift + F5
Step OverF10F10
Step IntoF11F11
Step OutShift + F11Shift + F11
Toggle BreakpointF9F9

Conclusion

Having a firm grasp of these shortcuts will really help you become more efficient at working with software , the first step is just to practice and an exercise that I use is to try and do everything using the shortcuts until it becomes muscle memory.

These shortcuts can often be customized, so the defaults listed here might not apply if they’ve been changed by the user. Additionally, both Visual Studio and Visual Studio Code release updates that can add, remove, or change shortcuts, and extensions can also add or override shortcuts. Always check the latest documentation or the settings within the editor for the most accurate information.

Leave a Comment

Your email address will not be published. Required fields are marked *