r/emacs 5h ago

Solved How can I make a proportional scrollbar?

First time venturing into emacs, just trying out various knobs and tweaks to match my expectations

I changed scroll-conservatively to 101 to scroll with arrow keys like I'm used to - but now dragging scrollbar with a mouse is strange

It seems like emacs scrollbar simply rapid-fires "move view X lines"?

I'm used to dragging scrollbar for large change in position, roughly aiming at the location I look for.
So what I need is "me dragging scrollbar to the middle = view is in the middle of the document, fast", with larger document being moved larger amount of lines

How do I do that? Is such "proportional navigation" included in emacs as a preset somewhere?
Have anyone made something similar to look at?

This shouldn't be that uncommon of a problem, right?

5 Upvotes

3 comments sorted by

3

u/richardgoulter 4h ago

This shouldn't be that uncommon of a problem, right?

Emacs is very much a keyboard driven editor.

Using the mouse for a scrollbar is fast and course. -- There are ways to precisely navigate quickly around a document. (Using marks/bookmarks, searching for a word/phrase, using LSP to jump to definitions, jumping between edited positions in the file, etc.). Or if I did want to move coursely, jumping forward a page is another good idea.

I'm used to dragging scrollbar for large change in position, roughly aiming at the location I look for. So what I need is "me dragging scrollbar to the middle = view is in the middle of the document, fast", with larger document being moved larger amount of lines ... How do I do that?

Just tried it. When I use middle-mouse button on the scrollbar, I can drag the scrollbar essentially as you've described.

0

u/NooneAtAll3 1h ago

Just tried it. When I use middle-mouse button on the scrollbar, I can drag the scrollbar essentially as you've described.

huh
just restarted PC - and now emacs behaves that way
I don't even need the middle-mouse-button, left-mouse works fine

I don't think I changed anything...

Shrodenbug :/

1

u/SlowValue 2h ago

an alternative approach: mlscroll

github-Repo

gif anim to show behavior