If you are a software engineer, or developer that uses the Microsoft Visual Studio code editor, and you have no idea how to use the different shortcuts tools provided, you are missing out big time.
One of the things I find difficult to do as a developer is the use a computer mouse. Some people find it enjoyable working with it and will be able to get things done at a faster rate, but others find it hard to cope with it. Sometimes it feels somehow boring. I can't just relate much more to how I feel about it. But now I am thankful to the Microsoft VS Code developers for introducing shortcuts. I no longer have to scroll every bit of the code line or look for a file before getting work done. Now with just a click away, everything will be settled.
The Visual Studio shortcuts help you to manipulate your code directly from your computer keyboard. Instead of manually searching lines of code or a file, In your program, these shortcuts will help you accomplish the same task by just pressing some keys on your Windows computer. For example, you can just press Ctrl+O to open a new file or folder on your computer instead of manually moving the mouse to do it for you.
In this article, I am going to try as much as possible to introduce to you some basic VS shortcuts for Windows that will help you with your coding journey.
Top 12 Visual Studio Code shortcuts for Windows
Highlights, copy, and past on VS code
To highlight, copy, and paste text or code on the Visual Studio Code, use these three keyboard shortcuts: Ctrl+A, Ctrl+C, and Ctrl+V.
1. Ctrl + A
Just the way it works for many operating systems, like Microsoft the Ctrl+ A is used to highlight/ Select all document content. To use Ctrl + A to highlight a text or code on VS code editor, you will need to first place your cursor on the area you want to select.
2. Ctrl + C
Ctrl + C Is used alongside the Ctrl+A keyboard. They work hand in hand with each other. It is used to copy the highlighted area on the Visual Studio Code editor.
3. Ctrl + V
To paste any copy of text or code on VS code, press the Ctrl+V keys. It will do it for you.
The combination of Ctrl+C and
Ctrl+ V can also be used to copy and paste files or folders within your program directory in VS code. To do this move your cursor on the file or folder, then press the Ctrl+C followed by Ctrl+V, and immediately then it will be duplicated close to the one you copy it from. Sometimes, the copied one will carry the copy extension mark.
Shortcuts to Look for file, and code lines on VS code
Sometimes it will be difficult to find a particular file or lines of code. This usually happens especially when you have hundreds of files or lines of code in one project. But with the Visual Studio code and file finder, you can get what you are searching for in just a few seconds.
4. Ctrl + F
The Ctrl + F is used to find code lines in VS code editor. This is useful when you already know the file that has the code you are searching for. To search for code lines, open the file and place your cursor on the code, then press Ctrl + F. Once you have done it, a search box will be displayed. Type the text or paste the code you are looking for. If the code exit it will be highlighted in yellowish color else it will show no file.
5. Ctrl + P
To search for files or folders within your program directory, use the Ctrl + P command. It helps you to locate a file or folder directory as quickly as possible. Ctrl + P helps you to see a list of some recent files that you have worked with. You also have the option to use the search box in case you are unable to see what you looking for on the list.
Other useful VS Code keyboard shortcuts
6. Ctrl + B
The Ctrl + B keyboard helps you to toggle the sidebar visibility. You can use it to collapse or show all the folder files you are working with.
7. Ctrl + Tab.
The Ctrl + Tab is used to switch between two files. It helps you to switch from your current folder or file to your recent one.
8. Ctrl+
Ctrl+ is used to show up the integrated terminal.
9. Ctrl + Shift +
The combination of both the Ctrl+ Shift + will help you to open a new terminal.
10. Ctrl + Shift + J
To inspect any element with Chrome Development Tools, press the Ctrl + Shift + J.
11. Ctrl+ \
If you are the type that likes splitting the editors, use the Ctrl + \
12. Ctrl + Alt +F
To format your file documents, press the Ctrl + Alt +F keyboard. It will fix that for you.
There are also many other shortcuts. We will try to update this article with the remaining ones. Stay tuned.