3 ms·
Even better: imap jk <ESC> imap kj <ESC> I just hit both and j at the same time with my pointer and index fingers so it's essentially one keystroke.
by positr0n 11y ago
Even better:
imap jk <ESC>
imap kj <ESC>
I just hit both and j at the same time with my pointer and index fingers so it's essentially one keystroke.
- illamint 11y ago`kj` has worked really well for me (except, actually, when trying to write a blog post about a recent trip to Reykjavik, but that's the one time it's bitten me versus the shitton of time it's saved). I also have `zkj` mapped to `<ESC>:w<CR>` to save AND exit insert mode.
- thomasahle 11y agoHow does this work? What if you are in insert mode and actually want to type j or k?
- leephillips 11y agoIt's the combination jk (or kj) that is set up to switch from insert to normal mode. The idea is that this combination rarely occurs in English text. The drawbacks are a slight delay in cursor movement when typing j or k as vim waits to see what comes next, and momentary confusion when you inevitably need to actually insert these sequences.