I've tried :help i_CTRL-G_CTRL-G
and :helpgrep CTRL-G
more generally and can't figure out why <c-g><c-g>
is equivalent to a <nop>
in insert mode.
For some context, I was having problems with the mapping:
nnoremap ` <nop>
And it was suggested in a comment here: Using a no-op key in insert mode, can't use key after using no-op mapping That I should use
nnoremap ` <c-g><c-g>
instead.
Using this workaround the problem is avoided, but I can't figure out why it works. In particular, I'm trying to understand how <c-g><c-g>
duplicates some or perhaps all of the observable behavior of <nop>
... while simultaneously hitting a different enough codepath to avoid triggering the bug.