如何使 VisualStudio 编辑器停止滚动过去的文件底部?

在 Visual Studio 编辑中,当您将 滚动条拉到文件底部时,您看到的只是一个 空白页,因为文本已经向上滚动到文本编辑器窗口的 头儿。这使得滚动到底部的 很难,因为你不能只是拉动滚动条快速所有的方式下来,但必须 小心点位置的光标,以便您仍然可以看到您的代码。

如何才能像在 NotePad 中那样,当我将滚动条拉到文件底部时,看到文件的底部?

12030 次浏览

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

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.

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