blog icon indicating copy to clipboard operation
blog copied to clipboard

sublime vintage mode 按住一个键(比如 j)不会重复的问题

Open xhlwill opened this issue 8 years ago • 5 comments

mac 用 sublime 时发现长按j不会一直往下走,发现这是 OS X 系统问题,确切的说是 Lion 及以上系统的 feature 🤦‍♂️

Holding down a key like j does not repeat the command

This is a feature of OS X Lion and newer versions. To make a key repeat a command when holding it down, run this once at the terminal:

defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool false

我用的是 sublimetext 3,如果用 sublimetext 2 的话将上面命令中的 3 改成 2 即可(执行命令后请重启sublime)。

有趣的是 sublimetext 3 官方文档写的一直是 com.sublimetext.2,一定是偷懒把 sublimetext 2 的直接拷贝过来了 🤣

顺便提一下,插件 Vintageous终止开发,作者转向 Sublime Six(http://www.sublimesix.com).


Update: Atom 的 vim 插件对于长按似乎已经帮我们做了额外处理,可以 repeat the command,例如下图光标一开始在开头的h,长按l,光标移动到了行尾的;……不过同时也会触发输入法自带的长按效果

image

xhlwill avatar Mar 26 '17 07:03 xhlwill

感谢,解决了我的问题

CuihuaGu avatar Dec 13 '17 05:12 CuihuaGu

Sublime Six 目前怎么用,还不知道

tutulove1234 avatar Mar 15 '18 08:03 tutulove1234

@tutulove1234 使用方法和vim一样,在sublime text里安装插件 six 即可

xhlwill avatar Mar 15 '18 08:03 xhlwill

为什么还存在 按 j 不连续向下呢

tutulove1234 avatar Mar 19 '18 02:03 tutulove1234

@tutulove1234 命令 defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool false 设置完请重启sublimetext,如果不行重启电脑

xhlwill avatar Mar 19 '18 04:03 xhlwill