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
Operation | Visual Studio | Visual Studio Code |
---|---|---|
New File | Ctrl + N | Ctrl + N |
Open File | Ctrl + O | Ctrl + O |
Save | Ctrl + S | Ctrl + S |
Save All | Ctrl + Shift + S | Ctrl + K, S |
Editing
Operation | Visual Studio | Visual Studio Code |
---|---|---|
Cut | Ctrl + X | Ctrl + X |
Copy | Ctrl + C | Ctrl + C |
Paste | Ctrl + V | Ctrl + V |
Undo | Ctrl + Z | Ctrl + Z |
Redo | Ctrl + Y | Ctrl + Y |
Duplicate Line | Ctrl + E, V | Alt + Shift + Down Arrow |
Comment Line | Ctrl + K, Ctrl + C | Ctrl + / |
Uncomment Line | Ctrl + K, Ctrl + U | Ctrl + / |
Format Document | Ctrl + K, Ctrl + D | Shift + Alt + F |
Go to Definition | F12 | F12 |
Peek Definition | Alt + F12 | Alt + F12 |
Rename Symbol | Ctrl + R, R | F2 |
Show Command Palette | N/A | Ctrl + Shift + P |
Search and Replace
Operation | Visual Studio | Visual Studio Code |
---|---|---|
Find | Ctrl + F | Ctrl + F |
Replace | Ctrl + H | Ctrl + H |
Find in Files | Ctrl + Shift + F | Ctrl + Shift + F |
Replace in Files | Ctrl + Shift + H | Ctrl + Shift + H |
Go to Line | Ctrl + G | Ctrl + G |
Window and Editor Management
Operation | Visual Studio | Visual Studio Code |
---|---|---|
Open New Window | N/A | Ctrl + Shift + N |
Close Window | Ctrl + F4 | Ctrl + W |
Split Editor | N/A | Ctrl + \ |
Next Tab | Ctrl + Tab | Ctrl + Tab |
Previous Tab | Ctrl + Shift + Tab | Ctrl + Shift + Tab |
Close Editor | Ctrl + F4 | Ctrl + W |
Debugging
Operation | Visual Studio | Visual Studio Code |
---|---|---|
Start Debugging | F5 | F5 |
Stop Debugging | Shift + F5 | Shift + F5 |
Step Over | F10 | F10 |
Step Into | F11 | F11 |
Step Out | Shift + F11 | Shift + F11 |
Toggle Breakpoint | F9 | F9 |
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.