Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

horizontal and vertical scrolloff #12344

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Wiener234
Copy link

Splits scrolloff option into scrolloff.horizontal and scrolloff.vertical.

This allows to have the line with the cursor centered while not centering also the column with the cursor.

screenshot-2024-12-26-12-20-47

On the left the scrolloff is set to 999 and i moved to the right of the line. On the right scrolloff.vertical is set to 999 and scrolloff.horizontal is set to 5 and i scrolled to the right of the line.

The right side gives you the option to have the line with the cursor centered while still not centering the column, allowing to edit files in split view with a line length of 80 without loosing the beginning of the line.

Nils and others added 6 commits December 14, 2024 20:43
just make horizontal scrolloff always 5, because in dont know how to
add new settings
adds struct for scrolloff with horizontal and vertical option
lets you adjust the scrolloff for horizontal and vertical independently
adds struct for scrolloff with horizontal and vertical option
lets you adjust the scrolloff for horizontal and vertical independently
adding section for scrolloff explaining the suboptions for vertical and
horizontal
@NikitaRevenco
Copy link
Contributor

NikitaRevenco commented Dec 26, 2024

nifty feature, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants