How to create a shortcut on Visual studio code

Endrit Qerreti

Endrit Qerreti

Are you fan of shortcuts? Did you know that on Visual studio code you can create your own shortcut?

Creating a shortcut on Visual studio code, it's really easy, and this method works on any Vscode installation, no matter the operating system.

Using shortcuts can save you time, and also boost your productivity, especially when we are talking about coding.

In this tutorial, you will learn how to create a custom shortcut on Visual studio code.

Create The Shortcut

To create a shortcut on Vscode, you must first launch vscode. Once vscode is launched, you need to press CTRL + SHIFT + P

This shortcut will open the window with all the actions available that you can select to create a shortcut.

Next, you need to select the action that you are going to create the shortcut for. To do this, search for the action name on the search box

To give you an example, we are going to create a shortcut that would create a readme.md markdown file on our project.

In this case, we need to search for this action "Create: Readme.md"

Next, click to the gear icon of the action

Now, you need to click to the "+" icon, and press the keys that you want to use for this shortcut

Once you press your key combination, they should appear on the box, next you need to press enter to save this shortcut

And you can use your newly created shortcut now.

Delete the Shortcut

To delete the shortcut that you created, you can do so from Keyboard Shortcuts window. To open Keyboard Shortcuts window, you can go to File > Preferences > and then click to "Keyboard shortcuts"

Alternatively, you can use the shortcut to open Keyboard Shorcuts directly, simply press CTRL + K first, and then press CTRL + S.

And it should take you to the Keyboard Shortcuts window.

Now to delete the shortcut, you can select the shortcut and then press the delete button on your keyboard.

You can also delete it, by right clicking over the shortcut, and choosing "Remove keybinding" option

Conclusion

By now you should know how to create a custom shortcut on Visual studio code.