如何按住一个键并让它在 VSCode 中重复? [英] How do I press and hold a key and have it repeat in VSCode?
问题描述
我使用 vim 插件,我通常只需按住 j 即可在 vim 中滚动.在 VSCode 中,持有 j 只执行一个 j 命令,无论它持有多长时间.
I use the vim plugin and I typically scroll in vim by just holding j. In VSCode holding j just does a single j command, no matter how long it's held for.
即使在 vanilla vscode 中,这也不起作用 - 如果您尝试输入长块 ########################## 用于注释分隔符.知道如何启用此功能吗?
Even in vanilla vscode this also doesn't work - problematic if you're trying to type long blocks of ########################### for comment separators. Any idea how to enable this functionality?
推荐答案
要仅针对 VSCode 禁用 Apple 按住,请在终端中运行以下命令:
To disable the Apple press and hold for VSCode only, run this command in a terminal:
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
然后重新启动 VSCode.
Then restart VSCode.
要重新启用,请在终端中运行此命令:
To re-enable, run this command in a terminal:
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool true
这篇关于如何按住一个键并让它在 VSCode 中重复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!