3

I knew that map / is _ on linux, but it not work on windows.

What should I do to map it?

0

1 Answer 1

5

Assuming you are talking about gVim

You are correct about Ctrl+/ working on Linux but not on Windows. That is because gVim under Windows doesn't see the Ctrl+/ combination. You can check if Vim receives a given sequence by hitting Ctrl+v (or Ctrl+q if you are using mswin.vim) followed the sequence, as explained in :help faq-20.4.

In faq-20.5 talks explicitly about Ctrl sequences, and Ctrl+/ isn't listed there as reliably detected by Vim.

Thus I believe you have two options:

  1. select another key combination to map
  2. use a external program to translate that combination into something that Vim can detect; for example, using Autohotkey:

    #ifWinActive ahk_class Vim
       Capslock::Esc
    #ifWinActive
    

    I use the above AHK snippet to remap Capslock to Esc when gVim window is active; you could try to remap Ctrl+/ to something like F12 and then map F12 in Vim.

Not the answer you're looking for? Browse other questions tagged or ask your own question.