How to map Ctrl-c to normal mode in zle

zsh

In zsh with vi bindings, I want to leave insert mode not only using Esc but also using Ctrl-c. I tried this as suggested in another answer.

bindkey -M viins '^C' vi-cmd-mode

Pressing Ctrl-c still just creates a new prompt below the last one. How can I bind to Ctrl-c in insert mode in zle?

Best Answer

You can try to just remap interrupting to any other key (1):

stty intr \^E
Related Question