2

I've become far too trained to use <C-C> to return to normal mode. I understand there is a difference between <C-C> and <ESC> but that's beside the point of this question.

I use the mapping nnoremap <C-C> <silent> <C-C> so I don't see the message "Type :quit<Enter> to exit vim" when pressing <C-C> in normal mode.

When in normal mode and pressing r I can't cancel with <C-C>, instead it will just insert the non printable character. Is there a way to change this behavior?

2
  • Your <C-C> is Ctrl+C, right?
    – slm
    Aug 21, 2014 at 8:19
  • I've updated the question Aug 21, 2014 at 8:38

1 Answer 1

2

First, that

nnoremap <C-C> <silent> <C-C>

has the <silent> parameter in the wrong position; it works, but not the way you think it does (and it beeps). Better use this:

nnoremap <C-C> <Nop>

To avoid the insertion of ^C when aborting r, define a special mapping for that, too:

nnoremap r<C-c> <Nop>
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .