In zsh how do you bind Ctrl+backspace to delete the previous word?

One may use bindkey '^H' backward-kill-word.

Note that, on old versions of GNOME terminal, it won’t work; see How do I get Ctrl-Backspace to delete a word in vim within gnome-terminal? and Bug 420039 – VTE doesn’t distinguish between backspace and control-backspace.
As reported by thorbjornwolf in his comment, commit 23c7cd0f fixed it.

Leave a Comment