Vim: Automatically enable KeyRepeat on MacOS

Created on 26 Aug 2017  路  9Comments  路  Source: VSCodeVim/Vim

  • Click thumbs-up 馃憤 on this issue if you want it!
  • Click confused 馃槙 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Following on from #1975.

The aim of this issue is to either enable key repeat by default on MacOS, or to more proactively notify MacOS users that they can set this option.

As I said in #1975, even though this is well documented, not all users think to check the documentation, and instead assume this is a bug.

From the README:

If key repeating isn't working for you, execute this in your Terminal.

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false # For VS Code
defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider

We also recommend going into System Preferences -> Keyboard and cranking up the Key Repeat and Delay Until Repeat settings to improve your speed.

There are a few questions here:

  • Does this impact all MacOS users?
  • Can we programatically set this option on MacOS?
  • Would there be any downside to doing so?
  • If not, can we more proactively notify impacted users that they can easily fix this issue.

If anyone can answer any of those questions, please comment in here.

Most helpful comment

I'm pasting the snippet from the README since this thread was the first result on the search engine:

Mac

To enable key-repeating execute the following in your Terminal and restart VS Code:

$ defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false         # For VS Code
$ defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider
$ defaults delete -g ApplePressAndHoldEnabled                                      # If necessary, reset global default

We also recommend increasing Key Repeat and Delay Until Repeat settings in _System Preferences -> Keyboard_.


_p.s. For the sake of vim and vim-mode, some Mac users do another command or two, to further modify Key Repeat and/or Delay Until Repeat settings._

All 9 comments

I don't believe our extension will have the authority to change macos user defaults. Can you cross-post this issue to VSCode?

Done @jpoon 馃槃

The docs aren't working for me. I'm running Sierra latest. Repeat isn't working

@fourcolors did you restart vscode.

@xconverge If you have a global setting you need to delete that first, ie defaults delete -g ApplePressAndHoldEnabled

It's in the README: https://github.com/VSCodeVim/Vim#mac-setup

The upstream issue was closed https://github.com/Microsoft/vscode/issues/19764 as won't fix. Am also going to close this issue as it doesn't look like it'll be resolved.

It's in the README: https://github.com/VSCodeVim/Vim#mac-setup

Updated link (the anchor changed) --

https://github.com/VSCodeVim/Vim#mac

I'm pasting the snippet from the README since this thread was the first result on the search engine:

Mac

To enable key-repeating execute the following in your Terminal and restart VS Code:

$ defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false         # For VS Code
$ defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider
$ defaults delete -g ApplePressAndHoldEnabled                                      # If necessary, reset global default

We also recommend increasing Key Repeat and Delay Until Repeat settings in _System Preferences -> Keyboard_.


_p.s. For the sake of vim and vim-mode, some Mac users do another command or two, to further modify Key Repeat and/or Delay Until Repeat settings._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajinder-yadav picture rajinder-yadav  路  3Comments

st-schneider picture st-schneider  路  3Comments

orn688 picture orn688  路  3Comments

jaredly picture jaredly  路  3Comments

cckowin picture cckowin  路  3Comments