I am using zsh, urxvt, tmux and in there vim. I am not 100% sure who causes the effect but I would like to bind something to ctrl and m but not to carriage return in vim. Does somebody how this is done?
Thank you very much in advance!
As far as Vim is concerned,
<CR> are the same thing: they are represented in the same way internally.
If your terminal is truly sending different keycodes (mine doesn't) for when you press Ctrl-M vs Enter, then you might be able to map them separately by using their literal values when you set up the mappings.
Replace the following in your
nnoremap <CR> [keypresses] nnoremap <C-M> [other keypresses]
With the following,
nnoremap [actual ctrl-m keycode] [keypresses] nnoremap [actual CR keycode] [other keypresses]
Where you enter the keycodes by pressing Ctrl-VCtrl-M and Ctrl-VEnter, respectively.