Speed Up Your Code – We will discuss the tips and tactics to boost you to speed Up Your Code in visual studio.
What is Visual Studio Code?
How to be productive to Speed Up Your Code With Vs-Code?
My top tips and tricks to Speed Up Your Code With Vs-Code:
Command Palette in VS Code
The very first tip is to know how to use the command palette. The key combination for command palette is Ctrl+Shift+P. It lets you access most of the commands. You can open files quicker through command palette than searching and clicking through several directories of your tree.
Use of Code Snippets/IntelliSense
VS Code has in-built code snippets. These code snippets or templates make writing repeated code or lines of code easier. You can insert your snippet in the Command Palette. Use of code snippet speeds up your coding a lot.
Live Server is a pretty cool extension that VS code has. You can launch a local server for your project. It has a live reload feature for static and dynamic pages.
Formatting code with a single shortcut key
We can clean up a piece of code or an entire code that is not formatted correctly by selecting those few lines and pressing the tab key to move them one by one. A better and faster way to format the code by selecting the piece of code or the entire code and then pressing Shift+Alt+f keys simultaneously.
Zen Mode gives you a viewport with all the distractions removed from the screen. This feature comes handy when you are writing an important piece of code and don’t want any distractions while doing it. You can press Ctrl and K simultaneously and Z ( Ctrl + K Z) to enter the Zen Mode.
Peek a Type Definition
It can be really disrupted to have several files open at once and looking for different types of definitions. However, with the VS code, you have a feature to a Peek Definition that shows you the properties on the flip side of the interface. To peek definition, you can right-click on the interface and click on the Peek Definition.
Change all the references
No matter how perfectly you write your codes, there are times when you need to find and change some words. It’s a tiring job to go through every line of code and find and rewrite it. However, the VS code makes it more accessible. You can select the word or phrase and right-click on it. You can find Change all references there. Click on it and write what you need to. Alternatively, you can just hit Ctrl + H and write what you need to find in the Find box and what should replace the word in Replace box. If you need to search and replace a word from whole project directories, go for Ctrl+Shift+H. It will do the job.
VS Code Live Share
VS Code Live Share allows you to share your VS code editor. You can collaborate with your multiple team members on a single document in real-time and work on some issues. The only thing you have to do is, install the extension Visual Studio Live Share and connect your Github account or Microsoft account. After that click on the Live Share in the status bar, you will be provided a unique URL, share it with your mates you would like to collab with.
Here comes the best of all. You can customize hotkeys, i.e., key combinations to our choice and comfort. VS Code has lots of keyboard shortcuts. You can use the default shortcut keys. You can easily change, remove, or reset those default hotkeys/shortcut keys. Press Ctrl + K Ctrl + S. It displays all the keyboard shortcuts, i.e., hotkeys and customizes it however you like.
Speed Up Your Code – We have learned and discussed the tips and tactics to boost you to speed Up Your Code in visual studio.