Search code examples
zsh

Zsh remove keybindings in a keymap


Im using the vi mode and there some bindings clashing so I want to remove them.

I tried doing that with bindkey "+" "" but it didn't work since the binding is in the keymap: vicmd, which is not active.
The man for zle doesn't metion anything about deleting bindings inside a map either.

So how can I delete a keybinding that is a specific keymap?


Solution

  • You can select the vicmd keymap either by name (bindkey -M vicmd ...) or with the -a option.

    To unbind the key, you can use the -r option.

    bindkey -ar "+"
    

    or

    bindkey -M vicmd -r "+"