[vim/vim] scrolloffpad: allow for keeping cursor centered at start of buffer (Issue #20058)

6 views
Skip to first unread message

mcauley-penney

unread,
Apr 24, 2026, 1:51:22 PMApr 24
to vim/vim, Subscribed
mcauley-penney created an issue (vim/vim#20058)

Is your feature request about something that is currently impossible or hard to do? Please describe the problem.

The recently added scrolloffpad option affords centering the cursor at end of buffer (EOB). Another popularly requested feature is to keep the cursor centered at start of buffer (SOB).

See comments in this Neovim issue and this Reddit thread

Describe the solution you'd like
scrolloffpad should afford the user the option to keep the cursor centered at start of buffer. If sop is equal to

< -1, invalid (already implemented)
-1, use use the global value (already implemented)
0, scrolloffpad is disabled (default; already implemented)
1, we can apply only at EOB;
2, we can apply only at SOB;
3, we can apply at both EOB and SOB;
> 3, invalid.

Describe alternatives you've considered
Given that scrolloffpad was recently accepted, there is a precedent for integrating this feature into core. Any alternative, such as existing plugins, would seem less appropriate in my opinion.

Additional context
See related issues:

  1. #13428
  2. neovim/neovim#25392 (comment)
  3. neovim/neovim#26366


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20058@github.com>

Vollow

unread,
Apr 25, 2026, 9:00:43 AMApr 25
to vim/vim, Subscribed
vollowx left a comment (vim/vim#20058)

Not so sure if I'm off-topic, but I wonder if this option will support such behavior implemented by scrollEOF, it allows users to scroll X lines more than usual, where X is the value of scrolloff.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20058/4319662594@github.com>

mcauley-penney

unread,
4:46 AM (7 hours ago) 4:46 AM
to vim/vim, Subscribed
mcauley-penney left a comment (vim/vim#20058)

@vollowx I personally view this as on-topic, but I'm confused about what the question is. The scrolloffpad (sop) feature already allows the view to use scrolloffpad as the X value you are asking about. If sop is active, the scrolloff value the user has chosen is the X number of lines that will display beneath the end of buffer.

The proposition of the feature request that we are currently having our conversation in is to also allow for scrolloffpad to apply the scrolloff value to the top of the buffer when the user is at it, e.g. cursor is on line 1.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20058/5250958883@github.com>

Reply all
Reply to author
Forward
0 new messages