The Best VSCode Shortcuts and Tricks to Boost Your Productivity

Learn the best VSCode shortcuts and tricks to save time and improve your workflow. These tips will help you code faster and more efficiently.

I am not too crazy about shortcuts, but I do really like to navigate through my code using mostly the keyboard. Here is a list of my most essential vs code shortcuts for everyone that is lazy to remember a huge list of them 👍

Top 11 Visual Studio Code Shortcuts That You Need to Know

Here are the top 11 visual studio code shortcuts that every developer should know. While working, these shortcuts can save you time and boost your productivity.

1. Command Palette


With the help of a command palette, you can access your commands according to your current context. You just need to type a keyword related to the command and find it, instead of navigating menus after menus.
Here, you can also find key bindings relevant to every command.

2. Quick Open

Windows: CTRL+P
Mac: CMD+P

With the help of this Visual Studio Code shortcut, you can open files rapidly. After this, you just need to use the down and up arrows on your keyboard to find the file that you need to open. When you find it, hit the right arrow key.

This action will help you open the selected file, which will go in the background while you can keep opening new files.

3. Toggle Sidebar

Windows: CTRL+B
Mac: CMD+B

Sometimes while writing the code, you want to use the full width of the editor. Simple enough, just use this shortcut to hide or show your sidebar quickly. This will give you full width of the editor.

4. Multi-Select Cursor

Windows: CTRL+D
Mac: CMD+D

Let’s understand this with an example:

When you need to change the H3 tags to the H4 tags (all of them) in a file, what will you do? Usually, programmers go through each instance of H3 tag and change each tag.
But, no! That’s not how you do it. You can multi-select all the H3 tags and change them to H4 at once.
For this Visual Studio Code shortcut, you have to select one H3 tag and use the shortcut. This will find every H3 tag and give you an active cursor for further action.
This is one of the most efficient shortcuts on our list that can help you improve your productivity.

5. Copy Line


During software development, it is common for programmers to copy lines and paste them elsewhere in the project. After this, small details in the lines are changed. This is done so frequently that you can actually use a keyboard shortcut for quick copying/pasting.

6. Comment Code Block

Windows: SHIFT+ALT+A (Multi-line comment), CTRL+K+C (Single-line comment)

Whether you are experimenting with a code modification or tracking a bug, commenting code blocks is a necessity. It is, in fact, done frequently. With the above shortcuts, you can save time on this activity.

7. Go back / move forward (ALT+LeftArrow,  ALT+RightArrow)

Windows: ALT+ —> or + –>
Mac: ^-

Do you want to move across from one location to another without using your mouse? Using these Windows and Mac shortcuts can help you navigate across the code easily.

8. Show All Symbols

Windows: CTRL+T
Mac: CMD+T

When you need to see all the symbols, i..e functions, classes,files etc. particular view, use the above shortcuts. This will help you open a Reference view, which displays your symbols. This shortcut is similar to a global find, but instead works with the symbols. This will be one of the most useful shortcuts while browsing the code.

9. Trigger suggestion and Trigger parameter hints

Windows: Ctrl+Space, Ctrl+Shift+Space
Mac: CMD+Space, CMD+Shift+Space

Trigger suggestions and parameter hints are useful when you are working on Visual Studio Code. However, this can be often frustrating as the suggestion box covers the previous code line.
A simple way is to quickly show or remove trigger suggestions and trigger parameter hints through keyboard shortcuts.

Trigger suggestion

Trigger parameter hints

10. Show References

Windows: Shift+F12
Mac: Shift+F12

During a context switch, you need to check things. Here, you can utilize peeked editors and go to References through the above keyboard shortcut. You can quickly check various references and make changes to them through this shortcut only.

11. Global Find


Global Find is also quite similar to Toggle Sidebar. It just helps you with the Global Find sidebar.


FunctionKeyboard Shortcut
Command PaletteWindows: CTRL+SHIFT+P
Quick OpenWindows: CTRL+P
Mac: CMD+P
Toggle SidebarWindows: CTRL+B
Mac: CMD+B
Multi-Select CursorWindows: CTRL+D
Mac: CMD+D
Comment Code BlockWindows: SHIFT+ALT+A
Go Back and Move ForwardWindows: ALT+ —> or ←-
Mac: ^-
Show All SymbolsWindows: CTRL+T
Mac: CMD+T
Trigger Suggestion and Trigger Parameter HintsWindows: Ctrl+Space, Ctrl+Shift+Space
Mac: CMD+Space, CMD+Shift+Space
Show ReferencesWindows:Shift+F12
Mac: Shift+F12
Global FindWindows: CTRL+SHIFT+F

#vscode #visualstudiocode

The Best VSCode Shortcuts and Tricks to Boost Your Productivity
1.95 GEEK