Attempt at good pixel-based smooth scrolling in Emacs
This package implements smooth scrolling by pixel lines.
It attempts to improve upon pixel-scroll-mode
by adding variable speed.
Install and load the package.
Then, enable good-scroll-mode
.
For example, you can add the following snippet to your config.
(good-scroll-mode 1)
If you want to bind the Page Up and Page Down keys, you can also add the following:
(global-set-key [next] #'good-scroll-up-full-screen)
(global-set-key [prior] #'good-scroll-down-full-screen)
Instead of scroll events directly scrolling the screen,
they update a destination variable.
A timer that runs every good-scroll-render-rate
seconds
calculates the expected position and actually scrolls the window to it.
To make the window scrolled partially through a line,
good-scroll
updates the window's
vscroll (vertical scroll)
position.
Scrolling sometimes pauses or stutters. It's unclear exactly why, but one factor is that Emacs lacks animation support. Emacs has timers for updating the screen contents, which is enough for playing simple animated GIF files, but not enough for video playback or frame-perfect smooth scrolling.
Other modifications, like
smooth-scrolling
,
smooth-scroll
,
sublimity-scroll
,
and inertial-scroll
also aim to improve scrolling in Emacs,
but none of them involve scrolling by pixel lines, only by text lines.
The built-in
pixel-scroll
does implement pixel line scrolling,
but, unlike good-scroll
, does not support dynamic scrolling velocity.
Apparently, GitHub does not yet support rendering Org links with formatting inside of them.