如何更改 Sublime Text 3 中的鼠标滚轮滚动速度?

How do I change the mouse wheel scroll speed in Sublime Text 3?

至少在 Linux 上,Sublime Text 3 中的鼠标滚轮滚动非常缓慢。它在我的鼠标上每个鼠标滚轮编码器刻度只滚动 3 行,感觉非常慢。然而,在 Eclipse 中,它在同一台计算机上使用相同的鼠标,每次鼠标滚轮编码器移动滚动 8 行,感觉更自然。

如何提高 Sublime Text 3 中的滚动速度以加快滚动速度?

我试过更改首选项中的 "scroll_speed" 设置。例如:

"scroll_speed": 10.0, // default is 1.0

而且它对鼠标滚轮滚动速度没有影响!原来这个设置只适用于滚动动画速度,当你按PgUpPgDn[=37时它会动画=] 滚动。

这是一个问答式的问题,我在这里发布是因为 I've searched all over the internet,但找不到这个答案。由于对Sublime中的滚动速度感到厌倦,自己弄明白后,想在这里分享一下,以帮助他人。

相关,但重复:

  1. [不是重复的,因为它与鼠标滚轮滚动速度完全无关;这仅用于 PgUpPgDn 滚动 动画 速度!] How do I change the speed of text motion when paging up/down in Sublime Text 3?

对于 Mac 和 Windows,查看您的操作系统中是否存在自定义鼠标滚动设置。

对于Linux,这是答案。使用 Sublime Text 3 和 4 在 Ubuntu 18.04 和 20.04 上测试。

# create a file called ".imwheelrc" in your home dir
gedit ~/.imwheelrc

将以下内容复制并粘贴到其中:

# For Sublime Text
"sublime_text"
None,      Up,   Button4, 3
None,      Down, Button5, 3
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5

两个3是设置鼠标滚轮滚动速度的。它们是正常速度的乘数,所以 3 快 3 倍。在我的例子中,一个鼠标滚轮滴答声现在滚动 9 行而不是 3 行,因为我将上下速度设置为 3 以上。

现在安装 imwheel:

sudo apt update
sudo apt install imwheel

运行 imwheel -b "4 5" 来测试您的设置。完成测试后,运行 killall imwheel 将其终止,然后根据需要对 ~/.imwheelrc 进行编辑,然后再次 运行 imwheel -b "4 5" 进行更多测试。

完成!

Sublime Text 3 鼠标滚轮滚动速度固定在 Linux!


注意:如果您想为 Google ChromeSlack[=63= 调整鼠标滚轮滚动速度] 同样,这里还有一些条目:

# For `google-chrome`
"-chrome"
None,      Up,   Button4, 3
None,      Down, Button5, 3
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5

# For `slack`
"slack"
None,      Up,   Button4, 3
None,      Down, Button5, 3
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5

# For Sublime Text 3
"sublime_text"
None,      Up,   Button4, 3
None,      Down, Button5, 3
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5

这是我 eRCaGuy_dotfiles project on GitHub. You can download just my "~/.imwheelrc" file here or here (raw) 的全部内容,使用以下命令:

wget https://raw.githubusercontent.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/master/home/.imwheelrc

参考文献:

  1. 我的eRCaGuy_dotfiles project on GitHub, and the "~/.imwheelrc" file
    1. 我的系统配置为 Ctrl + Alt + P(P 代表对于此处的“touch'P'ad”)打开和关闭我的触摸板,并且还与触摸板相反地打开和关闭我的 imwheel 程序。在我的 eRCaGuy_dotfiles 项目中查看我的 "touchpad_toggle.sh" 脚本。
    2. 我还在启动时将其配置为 运行,以便我的触摸板始终关闭,并且我的 imwheel 始终打开以修复这些程序中的鼠标滚轮滚动速度每次我打开电脑时。
  2. 我在 AskUbuntu 上的回答:"Permanently fix Chrome scroll speed"