0

I was trying to bind to <C-m> and <C-i> in nvim to move from window to but these seem to be mapped by zsh to newline and tab respectively. Is there any way to disable these mappings so I can use them for shortcuts?

Here's my nvim keymaps: (The keys are in weird positions as I'm using colemak-dh)

vim.keymap.set("n" "<C-m>", "<C-W>h")
vim.keymap.set("n" "<C-n>", "<C-W>j")
vim.keymap.set("n" "<C-e>", "<C-W>k")
vim.keymap.set("n" "<C-i>", "<C-W>l")

I checked the keyboard shortcuts in the gnome-terminal gui but neither appear.

I tried disabling the shortcuts in zsh but this doesn't affect nvim.

Is there anywhere else I can look for keyboard shortcuts?

Thanks for any help

Edit:

When I run the command suggested in the comments:

vim -Nu NONE +'nno <C-i> :echom "C-i was pressed"<cr>' +'nno <tab> :echom "Tab was pressed"<cr>'

Both <c-i> and tab result in the same output of Tab was Pressed

I tried removing the newline action of <c-m> from zsh but this made enter no longer work and also didn't seem to affect nvim.

I switched to kitty which fixed my issues.

6

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.