Home / GitHub Page

How to enable repeating keys in Vim mode

I'm using Vim mode and I'd like to enable repeating keys for cursor movement. E.g., if I hold down the 'j' key, I'd like the cursor to continue to move to the next line as long as I keep the 'j' key depressed.

Is there a way to enable this? (This works when I run vim in a terminal, by the way.)

I'm using Joplin 1.1.4 on macOS Catalina (10.15.6).

Thanks!

1 Like

Same here! It was not like that before. Please fix this issue!

@deisner @Penguin

I'm not really understanding what the issue is. I've played around with
https://codemirror.net/demo/vim.html (This is the current editor component for vim mode)
https://ace.c9.io/build/kitchen-sink.html (This is the previous one)
And I've tested on my local version of Joplin as well as terminal vim and all seem to have the same behaviour in terms of holding a key down.

Steps I used.

  1. Enable vim mode in Joplin.
  2. Press the j key.
  3. Wait until the cursor reaches the bottom of the document.

Perhaps you can tell me what the behaviour was before? Theres a chance it's also an OS issue, @Penguin are you also on macOS?

I'm on Ubuntu 20.04 for context.

1 Like

@CalebJohn MacOS 10.15.6 currently the latest one.
Just tested out those two editors, the first one has the same issue but the previous one works fine.

Thanks

Thanks for checking that out, this does seem to be a MacOS specific bug. I found an upstream bug report that has some more discussion about it, maybe the solutions there will work for you?

1 Like

@CalebJohn it has fixed with defaults write -g ApplePressAndHoldEnabled -bool false command and then reopening Joplin.
also confirmed that the true option goes back to the issue.
@deisner try this out mate

Thanks

2 Likes

The defaults command did the trick. Thanks everyone!

1 Like

defaults write -g ApplePressAndHoldEnabled -bool will change the settings system wide since -g stands for global.
Instead, if you want to change the settings only for joplin, use:
defaults write net.cozic.joplin-desktop ApplePressAndHoldEnabled -bool false

2 Likes