psliwka / vim-smoothie

Smooth scrolling for Vim done right🥤
MIT License
988 stars 27 forks source link

Feature request: customizable animation speed #22

Open mawkler opened 3 years ago

mawkler commented 3 years ago

I would like the ability to modify the speed of the scrolling animation. I don't know how difficult it would be to implement, but I would love if it were configurable by setting the duration time of the animation in milliseconds. If that's not possible, perhaps an animation factor that for instance doubles the duration of the animation if set to 2 and halves the duration if set to 0.5.

subnut commented 3 years ago

You might want to tweak with g:smoothie_update_interval and g:smoothie_base_speed

mawkler commented 3 years ago

Oh yeah that's it, thanks! I had no clue these already existed since they're not mentioned anywhere in the README and there are no helpfiles. Perhaps they should be added to the customization section in the README? :)

psliwka commented 3 years ago

Oh yeah that's it, thanks! I had no clue these already existed since they're not mentioned anywhere in the README and there are no helpfiles. Perhaps they should be added to the customization section in the README? :)

These actually were omitted from the README for a reason. Both are somewhat unstable:

I decided to hide these params from a casual user for now, until they are either fixed or replaced with more user-friendly counterparts.

pvonmoradi commented 3 years ago

@psliwka After latest update, I feel like the animation is somewhat "choppy" and "low-fps-like". Sorry, I can't describe it better :)

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan 15 2021 01:33:55)
Included patches: 1-2349

https://user-images.githubusercontent.com/1058151/104840031-22821f80-58da-11eb-871b-5cc4f13bcb90.mp4

psliwka commented 3 years ago

Note to myself: the @pvonmoradi's report came in before pushing out velocity curve tweaks (6cd5dea1698c0238a6d08eb8fc66696007483640 and 4bb75e5f85f933617cf1328d8a0089f85e8100c4).

psliwka commented 3 years ago

@pvonmoradi: could you please clarify whether your problem appeared after vim-smoothie update, or an update of Vim itself?

pvonmoradi commented 3 years ago

@psliwka I'm not 100% sure, but I think after vim-smoothie update. FWIW, here is the new animation after your most recent update:

https://user-images.githubusercontent.com/1058151/104851387-ea92d080-5909-11eb-9af4-84dad94c01cc.mp4

myermakov commented 2 years ago

Similar issue - love me more linear tweening... perhaps I'm too used to vim-smooth-scroll. I think the generous roll-off at the end is what contributes to perceived "choppiness". I ended up setting g:smoothie_speed_linear_factor=60 and g:smoothie_speed_exponentiation_factor=0.5. tasty plugin 😋

psliwka commented 2 years ago

@pvonmoradi: it is likely that your issue has been fixed in f2aaab110b49da21ab7abf4858173e3194109f6a.

pvonmoradi commented 2 years ago

@pvonmoradi: it is likely that your issue has been fixed in f2aaab1.

Thanks for the heads up. Just updated. Now PageUp/PageDown don't do anything. Also it seems the scroll is way faster (not as smooth/slow before).

psliwka commented 2 years ago

Now PageUp/PageDown don't do anything.

Ah, I escaped them incorrectly. Fixed with 3b87e35024fdbdf596841f5de840fc7e0b3c2fed.

Also it seems the scroll is way faster (not as smooth/slow before).

It is likely that for you it used to run way slower than I intended, and now it is running the way I wanted it to run in the first place ;) It should look like that now:

https://user-images.githubusercontent.com/6830301/166672604-0c467b49-42a3-43c1-831b-b09776bab0d6.mov