Closed nounder closed 1 hour ago
We don't need a new feature for this. Setting scrolloff
to a large number will do. For example,
opts = {
window = {
options = {
scrolloff = 999,
},
},
},
I tried that but there was no change whatsoever. Doing :set scrolloff 999
directly did nothing, too. What should be result of setting this option?
What should be result of setting this option?
The current line will always be centered in insert, normal, and visual mode.
Just tried running nvim -u NONE
with plain config and setting scrolloff
doesn't seem to do anything.
It's :set scrolloff=999
.
Setting the scrolloff
doesn't do anything in vanilla nvim or my config with zen-mode installed.
Terminal recording: https://asciinema.org/a/qwmwOVeytNKMmMzbIuFe3GcMT
Either your config does not respect scrolloff
, or your file does not have enough lines of visible text to satisfy scrolloff
setting. The later is documented:
'scrolloff' 'so' number (default 0)
global or local to window global-local
Minimal number of screen lines to keep above and below the cursor.
This will make some context visible around where you are working. If
you set it to a very large value (999) the cursor line will always be
in the middle of the window (except at the start or end of the file or
when long lines wrap).
scrolloff
cannot do what it described and shown in the original comment. It scrolls the text so that (when possible) there are always at least five lines visible above the cursor, and five lines visible below the cursor.
I would love a feature like this. Any other suggestions or plans to support this kind of functionality in zen-mode?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Did you check the docs?
Is your feature request related to a problem? Please describe.
It would be amazing to have typewrite-like experience by moving beginning of the document to the middle of the window. As words are written, new lines are always centered to the middle. Please see video below:
Describe the solution you'd like
A typewriter flag option to enable this type of writing experience.
Describe alternatives you've considered
Using iA Writer instead of nvim? :sad:
Additional context
No response