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

Feature request: customizable animation speed #22

Open
mawkler opened this issue Oct 17, 2020 · 11 comments
Open

Feature request: customizable animation speed #22

mawkler opened this issue Oct 17, 2020 · 11 comments

Comments

@mawkler
Copy link

mawkler commented Oct 17, 2020

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
Copy link
Contributor

subnut commented Oct 31, 2020

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

@mawkler
Copy link
Author

mawkler commented Oct 31, 2020

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? :)

subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 18, 2020
Include new customization options.
Closes psliwka#22
subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 22, 2020
Include new customization options.
Closes psliwka#22
subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 22, 2020
Include new customization options.
Closes psliwka#22
subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 22, 2020
Include new customization options.
Closes psliwka#22
subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 22, 2020
Include new customization options.
Closes psliwka#22
subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 23, 2020
Include new customization options.
Closes psliwka#22
subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 23, 2020
Include new customization options.
Closes psliwka#22
subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 23, 2020
Include new customization options.
Closes psliwka#22
subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 23, 2020
subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 23, 2020
subnut added a commit to subnut/vim-smoothie that referenced this issue Nov 23, 2020
subnut added a commit to subnut/vim-smoothie that referenced this issue Dec 14, 2020
@psliwka
Copy link
Owner

psliwka commented Dec 25, 2020

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:

  • Changing smoothie_update_interval distorts the acceleration curve. This should not happen (it should only change the refresh rate). I have not yet identified why is that so.
  • smoothie_base_speed may change its meaning drastically in the future, since the velocity curve algorithm is still WIP at this point.

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
Copy link

pvonmoradi commented Jan 17, 2021

@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
Peek.2021-01-17.15-38.mp4

psliwka added a commit that referenced this issue Jan 17, 2021
The subline potion was previously added with incorrect sign (should be
negated instead). This might be partially responsible for animation
speed quirks described in
#22 (comment)
@psliwka
Copy link
Owner

psliwka commented Jan 17, 2021

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

@psliwka
Copy link
Owner

psliwka commented Jan 17, 2021

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

@pvonmoradi
Copy link

pvonmoradi commented Jan 17, 2021

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

Peek.2021-01-17.21-20.mp4

psliwka added a commit that referenced this issue Feb 7, 2021
The rest of configuration variables remains hidden from a regular user,
as explained in
#22 (comment)
@myermakov
Copy link

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
Copy link
Owner

psliwka commented May 3, 2022

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

@pvonmoradi
Copy link

@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
Copy link
Owner

psliwka commented May 4, 2022

Now PageUp/PageDown don't do anything.

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

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:

Screen.Recording.2022-05-04.at.13.25.36.mov

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 a pull request may close this issue.

5 participants