【问题标题】:How do I change the mouse wheel scroll speed in Sublime Text 3?如何在 Sublime Text 3 中更改鼠标滚轮滚动速度?
【发布时间】:2020-10-10 02:51:45
【问题描述】:

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

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

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

"scroll_speed": 10.0, // default is 1.0

这对鼠标滚轮的滚动速度没有任何影响!原来这个设置只适用于滚动动画速度,当你按PgUpPgDn滚动时,它会被动画。

这是我在此处发布的问答式问题,因为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?

【问题讨论】:

    标签: scroll sublimetext3 mousewheel


    【解决方案1】:

    对于 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
    

    两个3s 是设置鼠标滚轮滚动速度的。它们是正常速度的乘数,所以 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 项目的一部分。您可以使用以下命令仅下载我的“~/.imwheelrc”文件here 或此处 (raw):

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

    参考资料:

    1. 我在 GitHub 上的 eRCaGuy_dotfiles 项目和 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"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-03
      • 1970-01-01
      • 2011-07-31
      • 1970-01-01
      相关资源
      最近更新 更多