Open
Description
Description of the new feature/enhancement
You can bind a key sequence like j,k
to a function or script block by Set-PSReadLineKeyHandler -Key 'j,k' -ViMode Insert -Function ViCommandMode
, but a user cannot insert a character j
after that.
Proposed technical implementation details (optional)
Quoted from #1701 (comment)
In vim, jk
or jj
to exit insert mode is super common. Usually it works like this:
- You press j
- j is written to the buffer
- A timer starts
- If you press the next key in the sequence before the timer is up, the
j
is removed from the buffer and the command fires - If the key you press next isn't in the sequence, or the timer is up then it's treated like a literal