Vim: enable key repeat option

In VS Code with Vim keybindings, you can press and hold a key to repeat it. For instance, holding j to navigate downward.

This is enabled by running:

defaults write ApplePressAndHoldEnabled -bool false

I want the same feature in Obsidian. I tried running this:

defaults obsidian ApplePressAndHoldEnabled -bool false

But no luck. It would be awesome to enable this, and eventually add it to the settings


YES!!! I just made a comment on this in some other post. I actually didn’t know that this was not default vim behavior. I may have put something in my .vimrc so long ago that I don’t even remember :sweat_smile:

But this would be SUPER awesome!

I wish I had key repeat in vim mode as well. In contrast to writing code, there’re a lot less declarative structure to how sentences and paragraphs are shaped. So I end up relying on moving between words and sentences a lot more. And key repeat would make these actions a lot faster (and intuitive).

Did anyone ever come up with a solution to this?

I don’t know how my solution will affect other applications, but this command works pretty well for me:

defaults write -g ApplePressAndHoldEnabled -bool false

While this is a solution, it affects the whole system, and now you can’t press and select special characters anywhere else anymore.

An obsidian based toggle (as in OP) would be really the best

I finally found how to do it! This will only affect Obsidian and not the whole system, just as stated in OP. Try this:

defaults write md.obsidian ApplePressAndHoldEnabled -bool false