I am unable to map <C-/>
in Neovim. In particular, it does not work for visual mode. I have created the mappings below:
vim.keymap.set('i', '<C-/>', '<Esc>:Commentary<CR>')
vim.keymap.set('n', '<C-/>', 'gcc')
vim.keymap.set('v', '<C-/>', 'gc')
Using vim I have the mapping below, which works fine:
imap <C-_> <Esc>:Commentary<CR>
nmap <C-_> gcc
vmap <C-_> gc
But <C-_>
also does not work for Neovim. I can also confirm using <C-V> <C-/>
that Neovim indeed sees <C-/>
and not <C-_>
like vim.
I am aware of this question, but it seems Neovim has different behavior from vim.
Edit: I found out it is a problem with Kitty, other terminals do send <C-_>