Visual Studio Code's New Editor Sticky Scroll Feature - Never Get Lost In The Code Again!😍
Tags: vscode, beginners, news, programming
Published: 2022-08-18 13:34:00

Finally came what many of us were not waiting for but wishing for! (_like the song that nobody expected but everybody needed it_). Who is not tired of having hundreds of lines of code and not knowing what class or interface you are in?

Scroll up, scroll down and keep getting lost in the code without being able to find the namespace or method you are looking for.

**You may have been scrolling too fast…**

But don’t worry because **the ultimate solution has finally arrived**. But don’t get excited, for the moment it has arrived for Visual Studio Code in “_experimental_” mode.

This new feature comes to avoid us developers the excessive wear of the mouse wheel (_I’ve seen some with more wear than the tires of a Formula 1_) and to save us a little anxiety.

![feature](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zxi4xb102zz5s1s86b5p.gif)

We are talking about **Sticky Scroll**, the new feature with which you will never again get lost in the code as if you were in a forest without a map.

Sticky Scroll has been introduced in the July release (a_lthough we are in the middle of August_) of **Visual Studio Code**, specifically in **version 1.70**. What this feature allows is to show UI with scope the user is in during scrolling.

Let’s see an example to get to meet our next best coding friend more closely:

![feature](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ubddgg3wzr6mzikeg6rr.gif)
 

_Thanks to [Stefan Judis](https://www.linkedin.com/in/stefan-judis/) for this [video](https://www.linkedin.com/feed/update/urn:li:ugcPost:6961403856849186816)_

Doesn’t it look cool, right?

According to the [latest Visual Studio Code Release](https://code.visualstudio.com/updates/v1_70#_editor-sticky-scroll):

> “It is now possible to display UI showing which scope the user is in during scrolling.”

If you are wondering how to enable it, you simply need to enable the `editor.experimental.StikyScroll.enabled` and you are done!

You can go to the settings of your Visual Studio Code (_remember it must be the latest version_) and look for the `Experimental>Sticky Scroll: Enabled` option, like me:

![feature](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y2bvp3gj9y91jbaoyvgd.gif)

There, now you are ready to never get lost in the code again!

Let’s also see a [Preview by Visual Studio Code](https://code.visualstudio.com/updates/v1_70#_editor-sticky-scroll):

![feature](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n6sd44eq7y9076tin6dl.gif)

According to [Visual Studio Code](https://code.visualstudio.com/updates/v1_70#_editor-sticky-scroll):

> “The “sticky scroll” UI will show which class/interface/namespace/function/method/constructor the top of the editor is in, helping you know the location within a document.”

And obviously this feature has generated a lot of hype among developers. The reception of this feature has been incredible, just look at the comments on the [Sticky Scroll video](https://www.youtube.com/watch?v=iM4Vhrk4irY):

![feature](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8rtwx8dy2b42axjb4u5c.png)

Some people even consider it **the most useful feature since the syntax highlighting** feature:

![feature](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2yy843fnc5sjmpi0p2b.png)
 
In my personal opinion I have to say that I would never have thought of a feature like this, but it is true that it is a “_very simple_” feature but at the same time very powerful.

I also have to say that I agree with [Andrii Lukianenko’s](https://www.linkedin.com/in/andrii-lukianenko-52644a162/) opinion in the [Linkedin post](https://www.linkedin.com/posts/addyosmani_softwareengineering-webdevelopers-activity-6961403883772407808-taoe), it seems to me a very correct point of view:

![feature](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3dokk1y1uopnhlq7b5bk.png)

I think he is right, if a function or method takes up more than one screen, it is most likely doing too many things. If we remember the **SOLID** principles in C# (_mainly SRP_), we can remember that in **Single Responsibility Principle** when something has more than one responsibility it means that we are not doing something in the best way.

I would like to know your opinion about this feature, do you love it? Do you hate it? Do you think it is unnecessary? Do you think it is your salvation?

I’m sure that the mouse scroll wheel of many developers will be very grateful for this feature. Finally it will be able to avoid its own wear and tear.

---

Right now, writing this article, I’m having a coffee (another xD). And I know that if you are reading this, you are one of the **1%** of people who read the articles to the end. So **comment me with emojis** how many coffees ☕ you drink a day (if I see many I won’t feel the only one🥺).

As there is still quite a day ahead of me, my amount of coffee yesterday was ☕☕☕☕☕