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.

Oldest comments (16)

Collapse
 
renanfranca profile image
Renan Franca

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

Collapse
 
nickytonline profile image
Nick Taylor

Captain America saluting

Collapse
 
monawwar 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

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

Collapse
 
wjplatformer profile image
Wj

Wowww

Collapse
 
nickytonline profile image
Nick Taylor

Pam from The Office saying Nice!

Collapse
 
j3ffjessie profile image
J3ffJessie

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

Collapse
 
ngocsotn profile image
The Ngoc Nguyen

Thank you for sharing this! Your posts are awesome.

Collapse
 
nickytonline profile image
Nick Taylor

Thanks for the kind words!

Kylo Ren on Undercover Boss giving a thumbs up

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

It works in nested functions as well 😍

Collapse
 
nickytonline profile image
Nick Taylor

It's True - Dwight Shrute

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

Collapse
 
bobbyiliev profile image
Bobby Iliev

Very cool!

Collapse
 
trinhngoctam1990 profile image
Marcus

Nice, thanks Sir

Collapse
 
emiltayeb profile image
Emil Tayeb • Edited

Its not working with function expression unfortunately

const x = ()=>{

}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
withextracheese profile image
pizzadonatello

Thought it was an annoying bug. But now that this article explained what is was. It's a welcome feature.