7 Best Visual Studio Code Tricks

visual studio code keyboard shortcuts,visual studio code keyboard shortcuts windows,best tricks in vscode,best tricks for vscode,

As a developer, he would like to code with VS Code editor. It's one of the most popular code editors. It has lots of advanced features and plugins that you can customize your VS Code. VS Code has the best themes to make your VS Code more beautiful for coding. As a senior developer, he must have to know some of the best VS Code tricks to make coding faster. Here, I've listed some of the best VS Code tricks that make your coding skills faster.

List of best VS Code Tricks

  • Select and Rename
  • Code Snippets
  • Multi Cursor Selection
  • Fast Scrolling
  • Add LogPoints
  • Select all events of a word 
  • Go to File

1. Select and Rename

1. Select and Rename,best vscode tricks, visual studio code keyboard shortcuts,visual studio code keyboard shortcuts windows,best tricks in vscode,best tricks for vscode,


Shortcut Key:: Select + F2

 
In VS Code rename the functions and variables is a very irritating thing when you are coding for your project. VS Code has feature finds and replaces that is useful for rename. But F2 is also used for rename.

When I learned that F2 is a rename command. I used it for the whole project to rename the variable and functions. Simply select the word you want to change, and press F2 and then write the new correct word. It is one of the best tricks for VS Code.

2. Code Snippets

As a developer, he knows snippets of VS Code for faster coding. When you are working with your project you often create a loop to repeat arrays, then you can create a snippet for it so you never have to type it again. It makes your work easier and faster. You can create snippets for your project and for programming and you can also find them on marketplaces.

I use snippets for common functions and variables which are repeat again and again. Use @category: "snippets" extension for search-only snippets, you can also define keywords after.

Let's see the basic example:


if error != null {
    return error;
}


We can not create snippets again and again but we have written it again and again.

Here I've listed some snippets

  • Scope:: It is a comma separator. To enable this snippet you need to use go.
  • Prefix:: It is one of the snippets.
  • Body:: You can write your code here.
  • Description:: A text description that completely understands the logic of coding.

3. Multi Cursor Selection

3. Multi Cursor Selection,best vscode tricks, visual studio code keyboard shortcuts,visual studio code keyboard shortcuts windows,best tricks in vscode,best tricks for vscode,


Shortcut key:: Shift + ALT + UP/Down button


Programmers have large source code and some of the lines are common in code. To write multiple lines at a time in VS Code that is also snippets available for it. By using this snippet we can have multiple cursors developing at the same time.

You can write at multiple lines at the same time by using this snippet. It makes your work faster and easier. It is one of the best vscode tricks for developers.

4. Fast Scrolling

4. Fast Scrolling,best vscode tricks, visual studio code keyboard shortcuts,visual studio code keyboard shortcuts windows,best tricks in vscode,best tricks for vscode,


Shortcut key:: ALT + UP/Down button


This trick does not require a special explanation, it’s just a small feature that once I learned it, I memorized all the time.

The developer has large source code for the project so there are so many coding lines are created by him for the project. So line by line scrolling is a wastage of time. For that vscode has a shortcut key for fast scrolling. By pressing the alt+up/down button you can scroll the display smoothly. It is one of the most used vscode tricks ever by developers.

5. Add LogPoints

5. Add LogPoints,best vscode tricks, visual studio code keyboard shortcuts,visual studio code keyboard shortcuts windows,best tricks in vscode,best tricks for vscode,

As a junior developer, there are many errors made by him. In VS Code editor that is one feature named log points, which is helping to debug the errors.


Logpoints allow you to "inject" on-demand logging statements into your application logic, just like if you had added logging statements into your application before starting it. It is one of the best vscode tricks.


You can set logpoints by right-clicking on the panel where you set breakpoints. Select Add logpoint and select between the three options given below:


  • Expression — Only log when the certain expression is true.
  • Hit count — Break when hit count condition found.
  • Log Message — Always log the message.

6. Select All Events of Word

6. Select All Events of Word,best vscode tricks, visual studio code keyboard shortcuts,visual studio code keyboard shortcuts windows,best tricks in vscode,best tricks for vscode,



Shortcut key:: Select + CTRL + SHIFT + L


This feature is similar to multi cursor feature. Sometimes we want to change comments, functions, variables, etc. We can combine multi cursor with selecting words. VS Code will generate a cursor at each occurrence.

7. Go To File

7. Go To File,best vscode tricks, visual studio code keyboard shortcuts,visual studio code keyboard shortcuts windows,best tricks in vscode,best tricks for vscode,



Shortcut key:: CTRL + Shift + O


Developers have a lot of files for their projects. So, this feature is useful for them to get the current location of the file. For some unknown reason, the outline function in VS Code is default fallen. It is an amazing feature in VS Code to find the current location of the file. An outline is a visualization of the code in a file. 

Thanks For Reading and also read for articles given below...



Post a Comment

Previous Post Next Post