In zsh, with emacs key mapping mode, Control + _ will cancel a completion.
Example:
echo $EDITOR[tab]
will be completed as:
echo vim
Pressing Control + _ will restore the editor to:
echo $EDITOR
I want to do the same thing with vi key mapping mode. Is there a way to do it? Is there already a key mapping to do it? Control + _ does not work neither in insert mode nor in normal mode.
The u (undo) will remove the entire line.
I finally found how to do it.
So I compared emacs and viins bindings and added the following line:
to the
.zprezto/modules/editor/init.zsh
. And it works.I made a pull request to add this mapping to prezto: https://github.com/sorin-ionescu/prezto/pull/1860