7 VS Code Productivity Secrets You should know

Photo by Jess Bailey on Unsplash

7 VS Code Productivity Secrets You should know

ยท

3 min read

VS Code is just like swimming in a lake. If you're very good at swimming, well then you're good to go. But, if that's not the case you would have a difficult time. VS Code is a multipurpose, easy-to-use text editor. However, the difficult part is that it is difficult to use effectively, using less time. In this blog, I will try to deliver as much as possible.

Try to avoid the use of a mouse

You can always avoid the use of a mouse and try to master your keyboard skills. It's difficult to switch between these two as it kills most of your time. As a keyboard is unavoidable, there is always an option to decrease the use of the mouse. You can do it by doing my using the cmd line for the basics command. Also, You can achieve this goal by learning some basic keyboard shortcuts.

Use of cmd line

Just by going to Ctrl + Shift + ~, you can go to the default terminal in vs code and use this command.

code .   // Open current directory 
code -filename-  // to create file of "filename" or to open that file, if present

Click here for further reading.

Use of Command Palette

As you've got it by its name, it's a place of collection of basic commands that you can perform easily with the help of a keyboard only. Just by clicking Ctrl + P, you open the command palette. You can navigate through multiple files from your working directory.

file_search

a) Use of > in cmd palette

You can also perform multiple tasks by using > in cmd palette or by clicking Ctrl + Shift + P.

command_search

b) Use of @ in cmd palette

You can also perform multiple tasks by using @ in cmd palette where you can see your elements, and components of the whole document.

object_chart

c) Use of # in cmd palette

This can also be useful to search for className, function name, and others. The interesting thing is that you can also search by capitalized letter of Camel cased word.

Use of VS Code Extensions

There are multiple extensions that you can try on. Some key extensions are listed below:

  • Quokka Js
  • Auto Rename Tag
  • Eclipse Keymap
  • Live Server
  • Better Comments
  • indent-rainbow
  • Code Runner
  • Extension pack for Java
  • ES7+ React/Redux/React-Native snippets

Use of Code Snippets

You can create your code shortcuts and assign them a name. And, whenever you need a code to write, you can just type that name, and vs code will recommend it to you.

For example I have created a boilerplate code of C++ and have been using it.

code-snippet

Did you find this article valuable?

Support Dristanta Silwal by becoming a sponsor. Any amount is appreciated!

ย