DEV Community

Cover image for Useful VS Code Shortcuts That Would Save Your Time & Increase Productivity
Raj Bhinde
Raj Bhinde

Posted on

Useful VS Code Shortcuts That Would Save Your Time & Increase Productivity

1.Command Palette
Windows: CTRL + SHIFT + P
MAC: CMD+SHIFT+P

This Shortcut opens up the command palette, you can access various commands as required. You just need to type the keyword related to the command and find it instead of navigating through menus

Image description

2.Toggle Sidebar
Windows: CTRL + B
MAC: CMD+B

Ever felt the VS code window to be too small even after using ALT + Z ? Try using this shortcut which will hide the Sidebar & give you full width of the editor.

Image description

3.Multi-Select Cursor
Windows: CTRL + D
MAC: CMD + D

Use this shortcut to select multiple tags & change them at once rather than going through one by one.

Image description

4.Copy Line
Windows: SHIFT+ALT+UP or SHIFT+ALT+DOWN
MAC: CMD + D

While writing the code, it is common for programmers to copy the lines & paste it elsewhere. This is used so frequently that there is a shortcut for this.

Image description

5.Show Errors & Warnings
Windows: CTRL + SHIFT + M
MAC: CMD + SHIFT + M

Check this shortcut out to look for any errors & bugs in your program. It opens up a panel where you can see the identified errors & warnings

Image description

6.Multi Cursor Selection
Windows: CTRL + SHIFT + L
MAC: CMD + SHIFT + L

What do you do when you have to change name of a particular tag (used everywhere throughout code) ? Most of the times, programmers go through each tag & change it. With this shortcut you can change the tag or tag name at once. Just select the code & use the shortcut. Note that this will change value of each & every tag name you selected

Image description

Bonus Shortcuts To Try :

A) Change Multiple Lines Together
Windows: CTRL + ALT + Arrow Keys
MAC: CMD + ALT + Arrow Keys

B) JUMP TO LINE
Windows: CTRL + P + Type " : "
MAC: CMD + P + Type " : "

C) JUMP TO HTML TAG
Windows: CTRL + P + Type " @ "
MAC: CMD + P + Type " @ "

D) Move your line of code up or down
Windows: ALT + UP/DOWN Arrow Keys
MAC: ALT + UP/DOWN Arrow Keys

I hope you find it useful :)

Comment down the shortcuts that you use daily, would love to see the replies

Top comments (0)