On 07/11/09 10:37, flyerhzm wrote:
>
> Hi,
>
> I tried to map Ctrl+/ to ,cc as follows:
>
> nnoremap<C-/>  ,cc
>
> but there's no response. Can anyone help me?
>
> Thanks in advance

You can't map Ctrl-/ in Vim because the only "Ctrl+printable key" 
characters which can be reliably mapped in Vim are those defined by the 
(already rather old) ASCII standard, which means the only printable keys 
which have a Ctrl counterpart are 0x3F to 0x5F plus the lowercase 
letters, as follows:

Ctrl+? (0x3F) = DEL (0x7F)
Ctrl+(key 0x40-0x5F) = subtract 0x40 from the printable character
Ctrl+lowercase = Ctrl+ the corresponding uppercase.

Nothing else. No Ctrl+digit and no Ctrl+slash (where / = 0x2F).

BTW, the above also explains why Vim cannot discriminate between

Ctrl-I and Tab          (both 0x09, HT)
Ctrl-M and Enter        (both 0x0D, CR)
Ctrl-[ and Esc          (both 0x1B, ESC)

Non-printable keys, OTOH, may or may not have a mappable Ctrl 
counterpart depending on your OS and on what (if anything) your keyboard 
interface (and, in Console Vim, your terminal) passes for them. For 
instance on my Linux system with KDE window manager, all Ctrl+Fn (and 
Alt+Fn) combinations are intercepted by the winmanager (and Ctrl+Alt+Fn 
by the kernel IIUC) for its own purposes and never passed to any 
application program.


Best regards,
Tony.
-- 
Whistler's Law:
        You never know who is right, but you always know who is in
charge.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to