On Wed, Oct 7, 2009 at 5:58 PM, Hoss <[email protected]> wrote:

>
> I am having trouble mapping my alt keys. so if I use this mapping
>
> <M-g> :echo hihi
>
> I get nothing when I hold down alt, and press g in normal mode.
>
> I have read :map-alt-keys in the documentation, and it suggests
> there's alot going on with getting the alt key from my keyboard to
> vim.
>
> My question is, is there some diagnostic mode in vim to somehow dump
> the key data that is going into it, so I can figure out what the issue
> is?
>
> I am using:
>
> u...@laptop:~$ vim --version
> VIM - Vi IMproved 7.1 (2007 May 12, compiled Jan  8 2009 02:19:16)
> Included patches: 1-314
> Compiled by [email protected]
> Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
> [ excluded for brevity ]
>
> on Ubuntu Hardy Heron
>
> thanks.
> >
>
in insert mode, try typing <C-v> first, then <M-g>. This should reflect the
exact key code that vim received. Then you can just copy whatever vim
displays into your map command directly (when I do this in
Ubuntu/gnome-terminal/vim-full, I see the escape character followed by g --
should look like "^[g" but where the "^[" is counted as a single character).

vim's i_<C-v> is really a good general purpose tool for finding out what the
terminal sees when you enter a certain key combo.

HTH,

-- 
Christopher Suter
www.grooveshark.com

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

Reply via email to