As developers, we use our mouse frequently and study has shown that assuming we work for 8 hours a day on our system we lose 64 hours a year if we use the mouse to do the work that can be done easily by our keyboard. Alarming right? 64hours that can be used to be productive elsewhere, moreover making use of a keyboard makes our code faster and more fun. Tell me who does not like some fun (smile)
This article focus on the 20 most used keyboard shortcuts for vscode. vscode (short for Visual Studio Code) is a free source-code editor made by Microsoft for Windows, Linux, and macOS.
The commands used by window users and mac users are slightly different. The window users use the control (**"ctrl"**) key that is equivalent to the **"command"** key for mac users. So let us dive into them.
To open and close vscode sidebar: ctrl + b
To open your files: ctrl + shift + e
To open the marketplace (This is where we get extensions to be installed): ctrl + shift + x
Switching from one folder or project to another: ctrl + r
To open terminals: ctrl + `
For the quick finding of files: ctrl + p
To move to a particular line in your code: ctrl + g
Switching from one language to another: windows + space
Moving from one tab to another (This is used when vscode screen are split): ctrl + 1, ctrl + 2.
The numbering i.e 1, 2, etc depends on the number of screens it is split into.
Selecting or highlighting word: ctrl + d
Word Wrap (This wrap our code according to the vscode screen size): Alt + z
To comment a code out ctrl +?
To move quickly to the beginning/end of a file: ctrl + Home/Ctrl + End
To toggle full screen: F11
To reopen closed tab : ctrl + shift + t
To type or edit the same code that appears in multiple lines: ctrl + alt + arrow up / ctrl + alt + arrow down
To move back and forth within files that are opened: Alt + arrow front / Alt + arrow back
To move a line of code to another line: Alt + arrow up / Alt + arrow down
To close a particular file: ctrl + w
To show more command line shortcut: ctrl + shift + p
Thanks for reading and if you find this article interesting please show me some love in the comment section and you can also repost on Twitter