rococode / vimflowy

archived - I switched to plaintext [my personal fork, not a clean dev environment. commits cherry-picked from here to PR to master]
https://vimflowy.netlify.com/
MIT License
0 stars 0 forks source link

center on current cursor with zz #8

Closed rococode closed 5 years ago

rococode commented 5 years ago

Not sure about difficulty on this one, but intuitively it doesn't seem too bad, just calculate Y diff between current cursor's position and page center and scroll accordingly.

rococode commented 5 years ago

ties in well with #7 for bullets near end of page

rococode commented 5 years ago

Implemented on -- key with 485a97e19217c7592bb9eb62253d3dcd9722d3ce

z is already used for toggling bullet collapse so I chose to use -- instead. - doesn't seem to be used for anything else so it's probably fine. I thought about just using a single - but I think from the zz reflex it's more familiar to have it be a double press; it can be remapped anyways as it's just a normal hotkey command.