Bind delete key in vi mode
bindkey -a '^[[3~' delete-char
Zsh has a variety of different keymaps and by default, bindkey will bind keys in the normal insert mode keymap. The command mode keymap is selected with -M vicmd
. -a
is a shortcut for that. You can list the keymaps with bindkey -l
. You'll see that there is also viopp
which is used for movements after a key like c or d. There's also visual for visual selection mode.