When you run a command such as
:! sleep 5, then you can normally cancel it using Ctrl-c. How do I remap that combination to something else, for example Ctrl-x?
The context is that I use urxvt with option
URxvt.keysym.C-c: eval:selection_to_clipboard (along with
stty intr ^X.) But this means that Ctrl-c doesn't get passed to vim, so Ctrl-c does nothing.
If I set
cmap <C-x> <C-c> then Ctrl-x will cancel commands that I haven't started yet, but it does nothing after I've started the command.
Alternatively, is there any way to get escape to cancel a running command?
I'm on NVIM v0.4.4. Thank you.