Skip to content
Related Articles
Open in App
Not now

Related Articles

7 VS Code Tricks That You Must Know

Improve Article
Save Article
  • Difficulty Level : Medium
  • Last Updated : 15 Oct, 2021
Improve Article
Save Article

VS Code Tricks are in reality those powerful tools or you may also say the features which the developers may confidently load in their pockets. From constructing the VS Snippets individually to helping you while speedily navigating the multiple VB files, it is possible to do such things via these dynamic VS Code Tricks. However, it isn’t vital to roll every trick in all of your VS projects anytime because they reciprocate the different results. And with every trick comes the customizations which one can’t ignore to bind straightaway to the IDE environment of Visual Studio comprising of Multi-Language Support, Auto-Indentation.


So, it would be better to know precisely what those tricks can do in the real-time computing environment of any of the pre-installed Visual Studio versions present on your laptops or desktops. Still thinking if any of those tricks will be helpful in bringing the best at times your VS coding capability has started decreasing!! Or, you face some sort of stress while finding Word-Based suggestions. Let’s take a step ahead now for knowing those 7 flexible and productive tricks that can promisingly allow you to utilize the full power of Visual Studio’s databases from where you can quickly access variables or VB functions.  

1. Constructing Your Own VS Code Snippets

Code Snippets or pre-defined templates of VS Code – both are the same thing. You may use such snippets again and again across various Visual Studio projects. Many a time, it becomes challenging to construct them on your own VS Snippet but with these fewer steps, it won’t be much complicated. The series of steps are as follows: –    

  1. Select the User Snippets which you want to construct. You can easily do that in any of the Visual Studio Code (Preferences).
  2. A list will now be available. This will be helping you create that VS Snippet-Type you are expecting. That type is either a Global-One or Language-Specific.
  3. Curious to Write the VS Code Snippet you desire! You better consider these points before doing the same: –
  • Scope – Can be used to decide what type of project or language the current VS Code Snippet will be used for.
  • Prefix – Your Shorthand or Companion for calling the Snippet.
  • Body – Some Sort of space for injecting the VS Snippet.
  • Description – Illustrating well what the Snippet (of Visual Studio) can do?

That’s all now to achieve!! Now, you better feel free to use the Code Snippets constructed via the aforementioned steps……

2. Using Select Plus (+) F2 for Renaming VS Functions

Renaming VS Functions or the Variables associated through Select Plus (+) F2 is really smooth. The reason for the same is that it renames the Variable or a Function (in your VS Code) every time it occurs, automatically. Due to this, it is possible to save a lot of time (say 2 or an hour) while finding, then replacing every variable or VS Function individually. Still deciding how you should be doing such a time-saving renaming!! Just give a glance at these below-steps: –

  1. There must be some variable present in the existing VS function. Time is to make the best use of the cursor or keyboard via Right-Click/F2 button.
  2. Rename Symbol Option is now visible helping you enter the present-day or new name.
  3. Feel now free to enter a present-day name and then, proceed with your action further with a confident hit of the enter button. 

3. Use of Multi-Cursor Selection to Double VS Code Speed

Multi-Cursor Selection is well-relatable with visibility of multiple cursors on your Visual Studio Screen at the same time. Through such a selection, editing at multiple places in your VS Project can be implemented in a hassle-free manner. Figuring out if this has doubled VS Code Speed!! Yes, with all jokes apart, allow yourself to use your lifetime keyboard via these instructions: –

  1. Bring forward the submissions of Alt Plus (+) Click. Wait now for fewer seconds!! What you ought to be doing is click the location/locations in your VS Code that you are wishing to edit.  
  2. Then, Holding the Alt Key down and initiate typing letters for instance “Welcome to My Multi-Cursor Selection mode”.  

Another way for doubling the VS Code Speed is the appropriate use of this mission-critical command [Shift Plus (+) Alt Key + ↑ (Upwards Arrow) / ↓ (Downwards Arrow)]. Does it not sound flexibly simple? Not think now missing this impressive chance in bringing out the great power of Multi-Cursor Selection.

4. Control Plus Shift + O for Faster VB files Navigation

Control Plus Shift + O – This VS Code Trick is really nice and you will surely be loving its implementation for accessing either a function/VS variable initially declared (by you) in any of the files or other larger Visual Studio databases. With this, you will discover how sweeter your debugging experience has now become? Anyways! Are you not curious to recognize if this can be made even much simpler? For this, you may adopt the habit written below: –

In the search bar of the VS IDE, there will be an @ symbol. Move your mouse’s cursor after this symbol. Then, Add Colon (:).

With the above-mentioned habit, navigating between the VB files, wanted structure, functions, variables, or the larger VB Code databases won’t be that much challenging. And very often, the Control Plus Shift + O command won’t pressurize you to scroll blindly through the Visual Studio databases or files as you have now a sense of what is there present in the existing files actually?

5. Making Use of ThunderClient for all kinds of VB Requests

ThunderClinet is a better alternative than Postman (a feature-rich application just for making API calls). Indeed, ThunderClient is a good VB Extension rather than a VB trick and you must install this extension for testing not only the websites somewhere handling complex or easier VB Requests but also the applications solving bit-tedious VS challenges. Thinking about what the different kinds of VB Requests could be! You may count this collection – PATCH, GET, DELETE, POST, & PUT.  

6. Set editor.wordBasedSuggestionsMode to allDocuments option

This is one of the useful VB Tricks as it offers the ability to the existing VS Codes to create word-based suggestions. You may now raise an obvious question – what actually are these word-based suggestions? So, those suggestions are a sort of helping hand that suggests simple words for successful textual completions in your VB files. For using this suggestion, what you should be doing is: –

  1. Search for the Settings option in your VS IDE. Open the icon of Settings and there, type editor.wordBasedSuggestionsMode.  
  2. Select the Drop-down (v) and then, change the available option to allDocuments.

Congrats!! From now, all the essential suggestions may now be introduced in any of your open VS files for improving your speed of writing the VS Codes.

7. Applying Predefined Mouse Shortcut for Being Productive

The prime motive of using a single or many mouse shortcut/shortcuts is to enhance productivity while writing VS Codes. This will be helping you a lot because for now, there is not that much need of using the mouse for the sake of finding either the variables or multiple VS files. Instead of pressing the left-or-right sides of your mouse harder which only will waste a lot of your precious time, you must be taking a look at these keyboard shortcuts: –

  1. Ctrl Plus (+) P – Helping a lot in finding the VB file you want from the list of available files displayed.
  2. Ctrl Plus (+) X – Helpful at times you decide to cut the complete/entire line without selecting the same.
  3. Alt Plus+( ↑ / ↓ ) – A Beneficial Keyboard Shortcut for moving the line in your VS Code from where the cursor is showing its positioning.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!