doctopus
doctopus

Reputation: 5647

How to unbind ctrl enter in vim?

So I use undotree and I have it bound to ctrl m:

nnoremap <C-m> :UndotreeToggle<CR>

But for some reason, when I press ctrl enter, it also toggles undotree.

And then when I try to unbind ctrl enter like below, it still toggles undotree.

nnoremap <C-CR> <Nop>

So question is, how on earth do I make it ctrl enter not toggle undotree?

Upvotes: 0

Views: 289

Answers (1)

romainl
romainl

Reputation: 196546

From Vim's point of view, <CR> and <C-CR> are indistinguishable. Since <C-m> and <CR> are two representations of the same key, pressing <C-CR> is effectively the same as pressing <C-m>.

See if :help modifyOtherKeys helps.

Upvotes: 4

Related Questions