Posted on 2 mins read

When I started C language years ago, I became a Vim editor developer. Since then, for all my backend developments, I have been faithful to Vim.

Few weeks ago, when I started to code in Elixir, I started as well to use IntelliJ IDEA with the Elixir plugin and obviously the Vim plugin.

On OSX, when you use the combination IntelliJ and IdeaVim it can happen that the keys you hold does not repeat themselves. For instance, when you are used to navigate in your code by holding the b or the w key to move in one line of code you feel quickly unproductive with this limitation.

To solve this issue IdeaVim team advises to change globally the ApplePressAndHoldEnable key value to false (cf. this IdeaVim code)

defaults write -globalDomain ApplePressAndHoldEnable -bool false

This change fix the do not repeat key issue but impact your whole system. The problem can be fixed by changing the ApplePressAndHoldEnable key only in the Jetbrains IntelliJ domain

defaults write com.jetbrains.intellij ApplePressAndHoldEnabled -bool 0

To be sure that your command has been accepted, the defaults read should return 0

defaults read com.jetbrains.intellij ApplePressAndHoldEnabled

You have to restart IntelliJ IDEA to let it gets this change.

If you have any doubts, you can verify that the JetBrains IntelliJ domain is still com.jetbrains.intellij

defaults domains | tr ',' '\n' | grep jetbrains