如何在 Sublime Text 3 中更改鼠标滚轮滚动速度? [英] How do I change the mouse wheel scroll speed in Sublime Text 3?

查看:79
本文介绍了如何在 Sublime Text 3 中更改鼠标滚轮滚动速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

The mouse wheel scrolling in Sublime Text 3, on Linux at least, is reaaally sluggish. It scrolls only 3 lines per mouse wheel encoder tick on my mouse, which feels very slow. In Eclipse, however, it scrolls 8 lines per mouse wheel encoder movement, on the same computer and with the same mouse, which feels much more natural.

如何在 Sublime Text 3 中提高滚动速度以更快地滚动?

How do I increase the scroll speed in Sublime Text 3 to scroll faster?

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

I have tried changing the "scroll_speed" setting in preferences. Ex:

"scroll_speed": 10.0, // default is 1.0

它对鼠标滚轮滚动速度没有影响!事实证明,此设置仅适用于滚动动画速度,当您按 PgUpPgDn 滚动时,它会被动画化.

and it made no difference to the mouse wheel scroll speed! It turns out this setting is for the scroll animation speed only, which is animated when you press PgUp or PgDn to scroll.

这是我在这里发布的问答式问题,因为 我搜索了整个互联网,并找到了这个无处回答.由于对Sublime的滚动速度太厌烦,自己弄明白了,想在这里分享一下,希望能帮到大家.

This is a Q&A-style question I'm posting here because I've searched all over the internet, and found this answer nowhere. After figuring it out myself because I got too tired of the scroll speed in Sublime, I want to share it here to help others.

  1. [不是重复的,因为它与鼠标滚轮滚动速度完全无关;这仅适用于 PgUpPgDn 滚动动画 速度!] 如何在向上/向下翻页时更改文本移动速度Sublime Text 3?
  1. [not a duplicate because it has absolutely nothing whatsoever to do with mouse wheel scroll speed; this is for PgUp or PgDn scroll animation speed only!] How do I change the speed of text motion when paging up/down in Sublime Text 3?

推荐答案

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

For Mac and Windows, see if custom mouse scroll settings exist within your operating system.

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

For Linux, here's the answer. Tested on Ubuntu 18.04 and 20.04 with Sublime Text 3 and 4.

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

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

Copy and paste the following into it:

# 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 以上.

The two 3s are what set the mouse wheel scroll speed. They are multipliers against the normal speed, so 3 is 3x faster. In my case, one mouse scroll wheel tick now scrolls 9 lines instead of 3, since I have the up and down speeds set to 3 each above.

现在安装imwheel:

sudo apt update
sudo apt install imwheel

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

Run imwheel -b "4 5" to test your settings. When done testing, run killall imwheel to kill it, then make your edits to ~/.imwheelrc, as desired, and run imwheel -b "4 5" again for more testing.

完成!

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

Sublime Text 3 mouse wheel scroll speed fixed in Linux!

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

Note: if you'd like to adjust mouse wheel scroll speed for Google Chrome and Slack too, here's some more entries:

# 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"文件 此处 或此处(raw),使用以下命令:

This is all part of my eRCaGuy_dotfiles project on GitHub. You can download just my "~/.imwheelrc" file here or here (raw), with this command:

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 程序.请参阅我的 touchpad_toggle.sh" 脚本我的 eRCaGuy_dotfiles 项目.
  2. 我还将其配置为在启动时运行,以便我的触摸板始终处于关闭状态,而我的 imwheel 始终处于开启状态,以在每次打开这些程序时修复鼠标滚轮滚动速度我的电脑.
  1. I have my system configured so that Ctrl + Alt + P (P stands for "touch'P'ad" here) toggles my touch pad on and off, and also toggles my imwheel program on and off inversely with the touchpad. See my "touchpad_toggle.sh" script for that in my eRCaGuy_dotfiles project.
  2. I've also configured this to run at boot so that my touchpad is always OFF, and my imwheel always ON to fix mouse wheel scroll speed in these programs each time I turn on my computer.

  • 我在 AskUbuntu 上的回答:永久修复 Chrome 滚动速度"
  • 这篇关于如何在 Sublime Text 3 中更改鼠标滚轮滚动速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆