How to make Visual Studio editor stop scrolling past bottom of a file?

Visual StudioEditor

Visual Studio Problem Overview


In the Visual Studio editor when you pull the scroll bar down to the bottom of the file, all you see is a blank page, since the text has scrolled up past the top of the text editor window. This makes scrolling to the bottom difficult because you can't just pull the scroll bar quickly all the way down but have to carefully position the cursor so you can still see your code.

How can I make it so that, as in NotePad, when I pull the scroll bar down to the bottom of the file, I see the bottom of the file?

Visual Studio Solutions


Solution 1 - Visual Studio

There is a configuration option provided in VSCode for the functionality you specified. To enable it, go to File -> Preferences -> user settings

On the right side of the editor in settings.json paste the below line at the bottom (before closing bracket), save and close.

"editor.scrollBeyondLastLine": false

This will prevent the editor from scrolling beyond the last line.

Solution 2 - Visual Studio

If you are willing to use the keyboard instead, pressing Ctrl+End will achieve what you want.

Solution 3 - Visual Studio

Inside of VS Code, Press command+,, and search for "Scroll Beyond Last Line" and untick it

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionEdward TanguayView Question on Stackoverflow
Solution 1 - Visual StudioDani AkashView Answer on Stackoverflow
Solution 2 - Visual StudioKonamimanView Answer on Stackoverflow
Solution 3 - Visual StudioDaksh ShahView Answer on Stackoverflow