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

Accelerate scroll on multiple key presses #70

Open
s1n7ax opened this issue Oct 20, 2022 · 1 comment
Open

Accelerate scroll on multiple key presses #70

s1n7ax opened this issue Oct 20, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@s1n7ax
Copy link

s1n7ax commented Oct 20, 2022

When user repeats the same key before the scroll is done, https://github.com/psliwka/vim-smoothie scrolls the same amount of lines but within the time of a single scroll instead of two scroll time. Similar feature would be nice in neoscroll as well.

Scenario 1:

  • User hit <c-d>
  • Neoscroll scrolls 10 lines in 500 ms
  • User hit <c-d> once again after the scroll is completed
  • Total lines scrolled is 20 lines and it took 1000 ms

Scenario 2:

  • User hit <c-d>
  • User hit <c-d> once again when only 5 lines has scrolled within 250 ms (before scroll is completed)
  • Neoscroll scrolls 15 lines 500ms
  • Total lines scrolled is 20 lines and it took 750 ms
@karb94
Copy link
Owner

karb94 commented Feb 4, 2024

This might conflict with the "stop on key release" feature. However, I can see some value in this. I think it makes more sense to speed the animation on the 3rd <C-d> rather than on the 2nd as it could mess up scrolling animations with easing functions (after the 2nd <C-d> the scrolling is constant at max speed).

This is a non-trivial change so I'll need to find some time for it.

@karb94 karb94 added the enhancement New feature or request label Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants