Get "PHP 8 in a Nuthshell" (Now comes with PHP 8.3)
Amit Merchant

Amit Merchant

A blog on PHP, JavaScript, and more

Sticky scroll in VS Code's File Trees

Today, I became a year older when I learned that VS Code’s File Tree has a sticky scroll feature. I mean, I never realized I would need this feature until I used it.

Essentially, the sticky scroll feature in the File Tree allows you to keep the opened folder in the view while you scroll through the files. This is particularly useful when you have a large number of files in a folder and you want to keep the folder in the view for the context while you scroll through the files.

The feature is not enabled by default. So, to enable this feature, you need to go to the settings and search for Tree: Enable Sticky Scroll and enable it. Once enabled, you can see the sticky scroll in action.

Alternatively, you can also enable it by adding the following line to your settings.json file.

"workbench.tree.enableStickyScroll": true,

Here’s how it looks in action.

Like this article? Consider leaving a

Tip

👋 Hi there! I'm Amit. I write articles about all things web development. You can become a sponsor on my blog to help me continue my writing journey and get your brand in front of thousands of eyes.

Comments?