VS Code Sticky Scroll

Today I’d like to introduce you to sticky scrolling, a new helpful feature in VS Code.

This feature lets you know in which scope you’re currently scrolling.

It currently supports Classes, constructors, methods, Interfaces, functions, and also JSON objects.

Enable Sticky Scroll

To turn it on, press down CTRL + , (comma) or go to File -> Preferences -> Settings, search for sticky scroll and tick the Sticky Scroll checkbox.

You can also limit the number of sticky lines by checking their respective checkbox or manually adding the following setting to settings.json file.

editor.stickyScroll.maxLineCoun: 5

5 is the default value.

You can also enable the Sticky Scroll feature via settings.json file.

Press down CTRL + SHIFT + P, type in settings, open the settings.json file and add the following:

editor.stickyScroll.enabled: true

Change Sticky Scroll’s Background

Even though it is not documented in the release notes, we can also change the background and hover background colors.

You might want to tweak these colors to be easier on the eyes, but for the sake of this example, it should do the trick.

Happy coding! ☺️

 

Let me know what you think about this article through comments below, or on Twitter at @pelu_carol.

If you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles.

 

You may also like...