4 ms·
Does anyone have any idea on how to map jj to escape? I tried karabiner elements but it disabled the j (down) movement. Thanks
by MorbidX 5y ago
Does anyone have any idea on how to map jj to escape? I tried karabiner elements but it disabled the j (down) movement. Thanks
- imbnwa 5y agoDunno about this version of Xcode but on Mac I tend to map Caps Lock to Ctrl so either in Vim or an emulation layer I can just use Ctrl+[ which is the same thing as <ESC> and doesn't require a new mapping, which can differ as to the if and how depending on emulation layer
- MorbidX 5y agoI did try that way but unfortunately jj has just become muscle memory and I'm finding myself trying to trigger escape with it. Hopefully I can find a solution or Apple release some sort of configuration file.
- sa46 5y agoHeh, I uses a similar keybinding, "jk", for escape that I can't get out of muscle memory. Works well enough in vanilla Vim and Emacs, but causes much pain in other Vim bindings, namely IntelliJ. Even if you do get it to work, you usually have to wait for the keypress timeout to detect the command. The sequence is something like: - Enter insert mode. - Press "j" - Nothing appears until 40 ms later, when keypress timeout passes and the logic falls back to insert a "j" character. I think Vim and Emacs use a fancier undo-mechanism, where they always insert the "j" and then delete the "j" if a command completes before the timeout in order to hide the latency.
- hboon 5y agoI use the same configuration for "jk" on both MacVim and AppCode + IdeaVim, and it has always worked for me: inoremap jk <esc> I just did an experiment, if I type "j" and pause, I can see "j" appearing and then almost immediately disappears, slight pause and then appear again. Is that the problem you are facing? But if I type fast (e.g "joking"), it doesn't seem to cause a visible delay.
- rgoulter 5y agoMaybe try Multi-tap in KMonad? https://github.com/kmonad/kmonad/blob/master/keymap/tutorial.kbd https://github.com/kmonad/kmonad/blob/master/keymap/tutorial... 1-tap to output j, 2-taps to output Escape?