/

May 3, 2024

My VS Code productivity boosters

My most trusted ways to speed up development

During years of working with Visual Studio Code I have implemented numerous productivity boosters that help me code faster and make living with the IDE more pleasant. Please read the table of contents below and feel free to read all the tips that are new to you. I hope that you’ll enjoy them as much as I do!

Table of Contents

Go to previous/next cursor position

After exploring the functions A, B & C I can navigate back or forward with the shortcuts

Whether I am going deep into the groundworks of some functions or I unintentionally moved my cursor to wild location, these cursor position shortcuts are very handy for me. When I discovered them I though they might be useful from time to time, but now I do not imagine working without them.

  • Accidentally closed a file? No problem, I navigate to previous cursor position!
  • Jumped to the top or end of a file by mistake? Navigate back!
  • Trying to compare two places quickly? Navigate back and forward quickly!

Keyboard shortcuts

I use these keyboard shortcuts when I am working in a coffee shop and away from my Logitech MX Master mouse. They are available in VS Code by default and I haven’t changed them to be able to use any computer and count to have them in place when I need them.

Mac: ctrl + _

Windows: alt + _

go to previous cursor position (navigate back)

Mac: ctrl + shift + _

Windows: ctrl + alt + _

go to next cursor position (navigate forward)
Custom shortcut can be set in Keyboard Shortcuts - VS Code

Assigning shortcuts to mouse buttons

I’ve assigned the shortcuts to my mouse which makes using them very easy and convenient. You can use any application to map them. I recommend Better Touch Tool which is my favourite power user app for the Mac, but it can be done in other ways. If you are using MX Master mouse you can set these shortcuts with free Logi Options app.

Execute a keyboard shortcut in VS Code app for back/forward buttons - Logi Options

Get a clear view! - Collapsing all folders

I enjoy understanding the code and exploring the codebase, yet it lead to project explorer starting to feel overwhelming in bigger projects. Fortunately there is a command for it! (You can easily set a keyboard shortcut for it – default is not provided)

Collapsing folder structure is easy and you can set your own shortcut for it easily!

Explore parameters and functions of a file - go to symbol

In VS Code it is dead simple to quickly jump through all symbols in a file.

Mac: cmd + shift + o

Windows: ctrl + shift + o

view symbols of open file

Mac: ctrl + shift + _

Windows: ctrl + alt + _

go to next cursor position (navigate forward)
Viewing symbols of a file

Summary

There are plenty of tips that could be given but these few really make me feel like a professional.

If you love shortcuts I recommend further reading here: Code Navigation in VS Code

These productivity boosters work great for me. If they don’t suit your work style feel free to pursuit your perfect IDE setup and share it with world! 😄

From the same category