DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for VS Code Tip of the Week: Sticky Scroll
Nick Taylor for VS Code Tips

Posted on • Originally published at community.vscodetips.com

VS Code Tip of the Week: Sticky Scroll

This week's VS Code Tip of the Week is the new sticky scroll functionality.

The nice thing about this feature is as you scroll, you have the context to where you are in the code because the sections stick at the top, e.g. a class definition, method definition, etc.

This is a feature you need to enable. Open your VS Code settings and search for sticky. Ensure Editor β€Ί Experimental β€Ί Sticky Scroll is enabled.

VS Code settings filtered on the word sticky

Check out this YouTube short care of Burke Holland on the VS Code YouTube channel.

Top comments (16)

Collapse
renanfranca profile image
Renan Franca

Thank you! I didn't know that i want it ☺️

Collapse
nickytonline profile image
Nick Taylor Author

Captain America saluting

Collapse
citizen428 profile image
Michael Kohl

Nice. I have something similar in my nvim setup's status bar, provided by nvim-navic:

Image description

Collapse
nickytonline profile image
Nick Taylor Author

Pam from The Office saying Nice!

Collapse
xencodes profile image
Monawwar Abdullah

Thanks for sharing. Can you tell me the font-family used in the first image?

Collapse
nickytonline profile image
Nick Taylor Author

I used Dank Mono. You can see my whole setup at iamdeveloper.com/uses

Collapse
wjplatformer profile image
Wj

Wowww

Collapse
bobbyiliev profile image
Bobby Iliev

Very cool!

Collapse
joelbonetr profile image
JoelBonetR

It works in nested functions as well 😍

Collapse
nickytonline profile image
Nick Taylor Author

It's True - Dwight Shrute

Collapse
ngocsotn profile image
The Ngoc Nguyen

Thank you for sharing this! Your posts are awesome.

Collapse
nickytonline profile image
Nick Taylor Author

Thanks for the kind words!

Kylo Ren on Undercover Boss giving a thumbs up

Collapse
j3ffjessie profile image
J3ffJessie

Oh this is going to be an amazing setting for me with my work codebase. Awesome tip.

Collapse
trinhngoctam1990 profile image
Marcus

Nice, thanks Sir

Collapse
emiltayeb profile image
Emil Tayeb • Edited on

Its not working with function expression unfortunately

const x = ()=>{

}
Enter fullscreen mode Exit fullscreen mode
Collapse
mrrpy profile image
Mr. R

Thank you! I "use" this feature frequently in other editors/IDE's but I didn't know that VS Code had it

DEV runs on 100% open source code known as Forem.

Β 
Contribute to the codebase or host your own.
Β 
Check these out! πŸ‘‡