On 04/08/09 02:23, Robert Mark Bram wrote: > > Hi All, > > Is it possible to map to control+number or control+`? > > I found these mappings didn't work. > > map<C-`> :hide bn<CR> > map<C-1> :hide bn<CR> > > I looked through :help keycodes and couldn't find reference to > backtick or tilde, but I have seen that you can map to the backtick by > itself. For example: > > " Use backtick for escape. > :imap `<Esc> > > Thanks for any advice! > > Rob > :)
You can map any key that Vim knows about. In particular, you can map 1 or ` by themselves, these are ordinary "printable" keys. What concerns the Ctrl + printable key combinations, Vim knows only those defined by ASCII, as follows: - Ctrl + anything in the range [0x40-0x5F] = the original key minus 0x40 - Ctrl + lowercase [a-z] = Ctrl + the corresponding uppercase - Ctrl + ? = 0x7F ` (backtick, 0x60) and 1 (one, 0x31) fall in none of the above categories, so Vim doesn't know about their Ctrl combinations. The above does not apply to the Ctrl + _non_-printable key combinations, some of which (such as Ctrl+arrows) can be detected by Vim on some platforms. For instance on my openSUSE Linux + KDE system, gvim gets Ctrl-arrow combinations with no problem but Ctrl-Fn keys are intercepted by the window manager. For _Console_ Vim I'm less sure which arrow-key combinations it can get. Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 101. U can read htis w/o ny porblm and cant figur eout Y its evn listd. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
