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-Vthen 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. – B Layer Nov 20 '20 at 21:28:h :map-alt-keys. (It says something similar to my last comment.) ..... (Edit: I added "nvim" tag to your question) – B Layer Nov 20 '20 at 21:40ctrl-o, and pressalt+/but nothing takes places, it just keeps waiting for a command.I tried:
– 8c6b5df0d16ade6c Nov 21 '20 at 08:21nnoremap ^[/ <leader>c<space>nnoremap <Esc>/ <leader>c<space>nnoremap <A-/> <leader>c<space>Ctrl-VnotCtrl-O– B Layer Nov 21 '20 at 11:21^[*whenever I pressalt+/and configured nvim to listen for, the equivalent,<A-*>. Now it all works great. – 8c6b5df0d16ade6c Nov 22 '20 at 19:26^[/? (!) Beyond that problem could be misconfiguration of the terminal or Vim's terminal config. You can try the following to see whether the problem is isolated to Vim: from shell promptcat > /tmp/foo, typeAlt-/then hit Enter, typeCtrl-D, then runcat -v /tmp/foo. Similar to theCtrl-Vtest in Vim this will show you the actual characters emitted byAlt-/. See anything different doing it this way? – B Layer Nov 23 '20 at 07:10