deathau / cm-typewriter-scroll-obsidian

Typewriter Scroll Obsidian Plugin
164 stars 15 forks source link

Idea: Delayed scrolling movement when clicking on a line. #10

Open splnkr opened 3 years ago

splnkr commented 3 years ago

Hey,

it would be very nice, if it is possible to implement that. Right now the scrolling is more an instaneaous jump to the line when clicking. This is a bit confusing as there is a high load of perceptive change. It would be better, if there is a brief delay and then a smooth scrolling movement to the clicked line. This would help the brain to comprehend the change because there would be a lesser cognitive load.

oldjove commented 3 years ago

I agree that an improvement here would be really welcome. I love typewriter scrolling but I find it hard to select text because of the immediate jump when I click somewhere. Perhaps it would be possible to have the jump occur when the mouse button is released rather than when it's clicked. I think this is the solution that programs such as iA Writer use.

deathau commented 3 years ago

I'm making some improvements here (it's been annoying me, too!) What I've done is to disable the "onCursorActivity" scroll, and enable scroll specifically on the arrow keys, so that clicking with the mouse doesn't scroll everything to the centre, but using the arrow keys on the keyboard does. I also adjusted it to scroll to the "head" of the selection, so it will scroll up and down when shift+arrow selecting something

oldjove commented 3 years ago

Thanks very much. This seems to be working much better now. I'm not noticing any annoying behaviour at least!