Hacker News new | ask | show | jobs
by julesnp 1209 days ago
If you already have Caps Lock remapped to Control, why not just use Ctrl-[ to get back to normal mode?

Ctrl-[ is the same keycode as escape in terminals, and it's much easier to reach. For me, remapping jk in insert mode results in lag after typing 'j'.

3 comments

This issue is only cosmetic as the other commenter explained. vim won't insert the character until you indicate you're not invoking the keymap (either by waiting or by typing other characters).

If you want a plugin that makes it so that the j appears immediately regardless of whether you're trying to invoke the keymap or not, you can use something like https://github.com/nvim-zh/better-escape.vim

> remapping jk in insert mode results in lag after typing 'j'

It only creates lag if you actually want to type 'jk'. Otherwise, you keep typing like normal, and it doesn't matter. You should be able to config the delay, too. I use `fd`, and I can count the number I've noticed it.

Keyboard layout, it would actually be Ctrl+Alt Gr+8.

That little lag on the j doesn't matter, when you notice you're already a few keys ahead anyway.

Ah, I hadn't thought about international keyboard layouts, yes, that sounds like it'd be a pain to type.