- Open VS Code.
- Click on File.
- Then find Preferences -> settings.
- Click on the Text Editor in the left side menu.
- Then Click on Cursor.
- Locate the Cursor Surrounding Lines (
- Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as scrollOff or scrollOffset insome other editors.) Setting and change it.