Closed NonlinearFruit closed 2 months ago
Glad you like it.
That's an interesting idea. I personally have text wrap enabled, so horizontal centering wasn't really a forethought for me, but I can look at adding it. I started playing around with it and right now I can have it center horizontally if you move toward the end of the line, moving the text left. Is that what you're thinking?
Yes, I believe so. I changed the normal! zz
to normal! zzzszH
so when the cursor tries to move to the right hand side of the window, the viewport also moves right (which is the same as the text moving left)
Cool, I'll work on something this weekend. I think I'll make it configurable as well, just so that way people can turn it on and off if they want it or not
Feature added. Update the plugin and enable the feature in the plugin config. Thanks again for the idea!
I like this implementation you went with here! Listening to cursor events instead of remapping individual bindings is a cool idea
Could add
zs
andzH
to center horizontally in addition to vertically (code). When in 'centering mode' I prefer also have the cursor horizontally centered as well