如何在 Sublime Text 3 或 4+ 中更改鼠标滚轮滚动速度?

问题描述 投票:0回答:1

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

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

我尝试更改首选项中的

"scroll_speed"
设置。例如:

"scroll_speed": 10.0, // default is 1.0

并且它对鼠标滚轮滚动速度没有影响!事实证明,此设置仅适用于滚动动画速度,当您按 PgUpPgDn 滚动时,就会出现动画。

这是我在这里发布的问答式问题,因为我在互联网上进行了搜索,但没有找到这个答案。由于我厌倦了 Sublime 的滚动速度,自己弄清楚后,我想在这里分享它以帮助其他人。

相关,但不是重复:

  1. [不重复,因为它与鼠标滚轮滚动速度完全无关;这仅适用于 PgUpPgDn 滚动 动画 速度!] 在 Sublime Text 3 中向上/向下翻页时如何更改文本运动的速度?
scroll sublimetext3 mousewheel
1个回答
3
投票

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

对于 Linux,答案如下。在 Ubuntu 18.04、20.04 和 22.04 上使用 Sublime Text 3 和 4 进行了测试。

# 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"
进行更多测试。

完成!

Linux 中的 Sublime Text 3 鼠标滚轮滚动速度已修复!


注意:如果您也想调整 Google ChromeSlack 的鼠标滚轮滚动速度,这里还有一些条目:

# 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

这是我在 GitHub 上的 eRCaGuy_dotfiles 项目的一部分。您可以使用以下命令在here或此处(raw)下载我的“~/.imwheelrc”文件:

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

参考资料:

  1. 我的 GitHub 上的 eRCaGuy_dotfiles 项目,以及 “~/.imwheelrc”文件
    1. 我的系统已配置为 Ctrl + Alt + P(P 在这里代表“touch'P'ad”)打开和关闭我的触摸板,还可以打开和关闭我的
      imwheel
      程序关闭与触摸板相反。请参阅我的 eRCaGuy_dotfiles 项目中的 “touchpad_toggle.sh” 脚本。
    2. 我还将其配置为在启动时运行,以便我的触摸板始终关闭,而我的
      imwheel
      始终打开,以在每次打开计算机时修复这些程序中的鼠标滚轮滚动速度。
  2. 我在 AskUbuntu 上的回答:“永久修复 Chrome 滚动速度”
© www.soinside.com 2019 - 2024. All rights reserved.