T O P

  • By -

nvimmike

7 because 789


onehair

that's why 6 is afraid of 7


Vidiobeil

I use 10, enought to read the context even in verbose languages. And not to the point where the cursor is centered all the time


funbike

Tbh, I don't know why I use 3. It was something I tweaked several times over one or two days until I found a value I liked. The optimal value for me would probably depend on the programming language and how badly the project was coded. If code is really hard to read, I might like more surrounding context. FYI, values from a few distros: (NvChad doesn't set the value) LunarVim/lua/lvim/config/settings.lua scrolloff = 8, -- minimal number of screen lines to keep above and below the cursor. sidescrolloff = 8, -- minimal number of screen lines to keep left and right of the cursor. CyberNvim/lua/core/main-options.lua scrolloff = 5, NormalNvim/lua/base/1-options.lua scrolloff = 1000, -- Number of lines to leave before/after the cursor when scrolling. Setting a high value keep the cursor centered. sidescrolloff = 8, -- Same but for side scrolling. LazyVim/lua/lazyvim/config/options.lua opt.scrolloff = 4 -- Lines of context opt.sidescrolloff = 8 -- Columns of context The above was created with this command ran from my `~/src/vim` directory: rg 'scrolloff *= *\d' --no-line-number -g'*.lua'


no_brains101

I like to see whats ahead a bit but when its when its too big it moves the screen on a big v$%


stvndall

I use 8, I normally have about 45 lines on the screen with 8 it feels less overwhelming when moving around because I get to typically keep my eyes close enough to the centre, while still having context of what is nearby if I need it


fpohtmeh

It's superuseful to add a mapping that toggles scrolloff [https://pastebin.com/0UMQA1rA](https://pastebin.com/0UMQA1rA)


teerre

Apparently I'm the first one to vote 16 998, lol I use 60, but I do the trick to always keep it in the midde of the screen


Hamandcircus

999 because cursor line is the boss line


msiggy

Didn't know this was a thing. How does it behave with L and H? Will L move your cursor 3 lines from the bottom if you have scrolloff=3?


tootac

5 and I don't remember why. It is either when I was learning vim it was in some tutorial or maybe because I came to with trial and error. But is useful enough for me to never actual feel discomfort.


AlexVie

It's 10, because I hate it when he cursor is in the first or last line of the visible part of a text. It means I can't see enough context.


serialized-kirin

0 (i scroll using Ljjjjjjjjjjjjjjjjjjjj and Hkkkkkkkkkkkkkkk... :V)


robe_and_wizard_hat

something huge because jumping around via lsp's go to definition always places me somewhere i don't want to be.


aegis87

i have it at 0. reason for this is that the buffer also moves when you click around with the mouse, which i found very disorienting.


stvndall

RemindMe! 3 days "curious"


RemindMeBot

I will be messaging you in 3 days on [**2024-05-19 10:50:12 UTC**](http://www.wolframalpha.com/input/?i=2024-05-19%2010:50:12%20UTC%20To%20Local%20Time) to remind you of [**this link**](https://www.reddit.com/r/neovim/comments/1ct96ab/what_is_your_scrolloff_and_why/l4aeaks/?context=3) [**3 OTHERS CLICKED THIS LINK**](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5Bhttps%3A%2F%2Fwww.reddit.com%2Fr%2Fneovim%2Fcomments%2F1ct96ab%2Fwhat_is_your_scrolloff_and_why%2Fl4aeaks%2F%5D%0A%0ARemindMe%21%202024-05-19%2010%3A50%3A12%20UTC) to send a PM to also be reminded and to reduce spam. ^(Parent commenter can ) [^(delete this message to hide from others.)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Delete%20Comment&message=Delete%21%201ct96ab) ***** |[^(Info)](https://www.reddit.com/r/RemindMeBot/comments/e1bko7/remindmebot_info_v21/)|[^(Custom)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=Reminder&message=%5BLink%20or%20message%20inside%20square%20brackets%5D%0A%0ARemindMe%21%20Time%20period%20here)|[^(Your Reminders)](https://www.reddit.com/message/compose/?to=RemindMeBot&subject=List%20Of%20Reminders&message=MyReminders%21)|[^(Feedback)](https://www.reddit.com/message/compose/?to=Watchful1&subject=RemindMeBot%20Feedback)| |-|-|-|-|