VS Code Shortcuts every developer needs to know

ยท

3 min read

VS Code Shortcuts every developer needs to know

Hello ๐Ÿ‘‹ Developer

Keyboard shortcuts can tremendously improve your coding efficiency. But not every one knows about these shortcuts. So I have decided to list the most essential shortcuts in this article. Make sure to get comfortable with them.

Table of Contents

Absolute Essentials

These are the most essential shortcuts that you will find useful everywhere. Most of these shortcuts want you to select the code before you work on. Just assume that every shortcut that specifically targets something need you to select it before using the shortcut key.

Action Shortcut
Copying lines upShift + Alt + Up
Copying lines downShift + Alt + Down
Move lines upAlt + Up
Move lines downAlt + Down
Multiple CursorsAlt + Click
Commenting a single lineCtrl + /
Commenting multiple linesCtrl + Shift + A
Renaming a Variable or FunctionF2
Quick fixCtrl + .
IntelliSense SuggestionsCtrl + Space
Auto formatting codeShift + Alt + F
Toggle terminalCtrl + J
Toggle sidebarCtrl + B
Toggle sidebar File ExplorerCtrl + Shift + E
Go to DefinitionF12
Go to ReferenceShift + F12

Command Palette ๐ŸŽจ

The command palette in VS Code lets you do many things. Once you have mastered this you can work with ease in any language. The command palette can also help you work with GitHub once you are familiar with it. As you know GitHub is the most essential thing every developer should be comfortable with. I also plan on posting an article about how easy it can be to learn to work with GitHub using VS Code.

Shortcut

F1 or Ctrl+Shift+P

Opening files

When working on a project you will need to work with multiple files simultaneously. You will be wasting a lot of time if you choose to search it using the File Explorer. It can easily be achieved using the Command Palette just open Command Palette using F1 and delete the > character. The dialog box will show you the list of available files with in the current folder ๐Ÿ“‚ and you can open any file you wish.

Conclusion

There are still many more shortcuts and features hiding within VS Code, but they are not something that you would use in your daily developer life. Hope you make the most of these shortcuts. Comment down your thoughts about this post ๐Ÿ“ฏ. If you think ๐Ÿค” I have missed anything please let me know in the comments and I will surely consider it.

Thanks for your time ๐Ÿ˜Š

P.S This post is more of a cheat sheet than of a article, cause I dont want to dilute this unnecessary explanations ๐Ÿ˜…. Hope you find it useful.

ย