How do I enable smooth scrolling in RStudio editor?

Hi, there!

Is there a hidden setting in RStudio somewhere for enabling / disabling smooth scrolling in RStudio editor windows / panes? As far as I know, smooth scrolling in the editor is only possible by moving the scroll bar with the mouse. Enabling smooth scrolling in the Editor settings would be a substantial Quality of Life improvement to my R, and RStudio, coding experience. Especially when working in RStudio for a long time, the instant, jumping scrolling can get quite rough with inevitable eye strain and migraines.

I have found no such option in the RStudio IDE settings, nothing on the posit community forums, nothing elsewhere, except that someone uses / used an external program to override the displayed scrolling behaviour in RStudio on this GitHub Issue: Allow disabling "scroll speed sensitivity" under Code > Editing #13360.
On the RStudio subreddit, this question was also posed some time ago under 'Smooth scrolling' with a disappointing answer (only possible with mouse).

At this point, switching to VS Code (R in Visual Studio Code) for R coding starts to sound nice despite the previous R integration difficulties (2 years ago, probably fixed by now).

PS: I am using R version 4.2.2 and RStudio 2024.04.0 Build 735.

Best regards,
rad Roy

1 Like

I'm not sure if this is what you want, but try going to Tools > Global Options ... > Code > Editing and reducing the value of the "Editor scroll speed sensitivity" setting.

No, unfortunately, this is not what I am looking for. The setting you mentioned can be essentially translated to
"How many pixels do you want the editor to move for 1 tick of scrolling done by your mouse wheel?"

Whereas the setting I desire but does not seem to exist would be the equivalent of
"What do you want the animation to be like when scrolling?
A: No animation. Just shift the text to the next position in one frame.
B: Softly accelerating and decelerating."

Ideally you would have the setting of configuring the acceleration curves, maybe with a custom function? Would sure be fun.
... Maybe just add extensionability / moddability.

I do not think there is an option for smooth scrolling in RStudio, currently.
PS: How to go about suggesting/requesting a feature for RStudio IDE?
PPS: The console window actually has smooth scrolling enabled by default (but there is no setting for that window, either). This feature (i.e., setting) is what I am looking for for the editor window/pane.

1 Like

I've opened an enhancement request: Option to enable smooth scrolling in text editor · Issue #14696 · rstudio/rstudio · GitHub

Our text editor component (Ace) has an "animatedScroll" flag that we don't currently use, so if that does what you're wanting, this might be a relatively easy improvement.

You can play with it at Ace Kitchen Sink. Turn on the "Animate scrolling" option in the big list of choices on the left and see if this improves the situation.