FYI for Lion users who use IdeaVIM

If you have upgraded to Lion and you also use the IdeaVIM plugin you may be annoyed by Apple turning of key repeating (hold down a key and it repeats). Wierd! Anyway, this is a problem if you use h,j,k,l for navigation with IdeaVIM and want to move by holding down those keys.

You cannot turn off this odd decision via System Preferences, however, there is a defaults write you can use, from Terminal:


defaults write -g ApplePressAndHoldEnabled -bool false


It looks like you have to reboot before it takes effect. Although you may want to try just restarting IntelliJ and see if that works before going for the reboot (I just went for a reboot and all is well now).

19 comments
Comment actions Permalink

Worked great -- didn't even have to reboot!

0
Comment actions Permalink

Hello Michael,

Thanks a lot for the posting this workaround here :)

Regards,
Oleg

0
Comment actions Permalink

Nothing weird about it. The repeat is turned off on Lion because of the new feature that shows alternative accented characters when you hold down a key, e.g., è, é, etc. Be aware that turning repeat back on kills that functionality.

1
Comment actions Permalink

It is a wierd change for people that depend on the key repeat functionality and have absolutely never had to type an accented character.

0
Comment actions Permalink

Better solution: you can enable key repeat per-application, so that you can still use it in other apps (if you want to do so). For the Community Edition of IntelliJ, at least, you'd do:

defaults write com.jetbrains.intellij.ce ApplePressAndHoldEnabled -bool false

Then just restart IntelliJ and you're golden.

0
Comment actions Permalink

By the way, I tried that on the ultimate edution with .ue and .iu instead of .ce, but it didn't work.  The global one did, though.  Thanks!

0
Comment actions Permalink

If anyone besides me is using IdeaVIM with AppCode, the correct line is:

defaults write com.jetbrains.AppCode ApplePressAndHoldEnabled -bool false

0
Comment actions Permalink

And for PhpStorm correct command is:

$ defaults write com.jetbrains.PhpStorm ApplePressAndHoldEnabled -bool false
0
Comment actions Permalink

Nice job!Thank you

0
Comment actions Permalink

The correct line for Ultimate Edition is defaults write com.jetbrains.intellij ApplePressAndHoldEnabled -bool false

0
Comment actions Permalink

Thank you so much for this! Also, for those who use PyCharm:

defaults write com.jetbrains.PyCharm ApplePressAndHoldEnabled -bool false

No reboot required for me, just had to restart PyCharm.

0
Comment actions Permalink

It seems like this could be made the default behavior when installing the IdeaVIM plugin (or make it a preference).

Thanks for posting the solution!

0
Comment actions Permalink

This option is an operating system level preference, not an application level preference.

0
Comment actions Permalink

Thanks for this it works like a charm.

Cheers

0
Comment actions Permalink

thanks for posting this, I was really struggling with the native setup

0
Comment actions Permalink

I'd prefer not to turn off the system default for all apps, so I tried the approach suggested for app specific changes - with no luck.

defaults write com.jetbrains.RubyMine ApplePressAndHoldEnabled -bool false

Has anybody had any luck fixing the key repeat problem for RubyMine?

0
Comment actions Permalink

For Android Studio, it's:

defaults write com.google.android.studio ApplePressAndHoldEnabled -bool false

0
Comment actions Permalink

What is the command for RubyMine?

0
Comment actions Permalink

For WebStrom, it's:

 

defaults write com.jetbrains.WebStorm ApplePressAndHoldEnabled -bool false

0

Please sign in to leave a comment.