Trying to map the NERDCommenter
's toggle comment action (mapped to <leader>c<space>
) to alt+/
, something a bit more familiar. I tried:
nnoremap <A-/> <leader>c<space>
...but it doesn't seem to work or do anything. Do I have the key alt+/
wrong ? how can you represent the /
character in .vim
?
/
is/
. It's not the problem. Did you try Insert mode, hitCtrl-V
then hitAlt-/
? Whatever you see there make that the mapped key. In one of my environments it's^[/
. The^[
is the control character equivalent toEsc
. So I donnoremap <Esc>/ etc
. That's an example.:h :map-alt-keys
. (It says something similar to my last comment.) ..... (Edit: I added "nvim" tag to your question)ctrl-o
, and pressalt+/
but nothing takes places, it just keeps waiting for a command. I tried:nnoremap ^[/ <leader>c<space>
nnoremap <Esc>/ <leader>c<space>
nnoremap <A-/> <leader>c<space>
Ctrl-V
notCtrl-O