I tried and got the same. Then I did this

  :map

and found the map defined just now is not ^[g but ç.
This is what I get when I type i<C-v><M-g> in GVim.
I think this is the reason.

On 10月8日, 上午7时19分, Chris Suter <[email protected]> wrote:
> On Wed, Oct 7, 2009 at 6:50 PM, Hoss <[email protected]> wrote:
>
> > > 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).
>
> > This works excellently, except that I can't use exactly what vim
> > displays in my map command.
>
> > My <C-v><M-g> shows the same thing as yours. However, if I type ":map
> > <C-v><M-g> :echo hi" into a buffer, then execute that line, i get
> > garbage.
>
> > However, using the knowledge that the "^[" means escape as you say, if
> > I try this
>
> > map <Esg>g :echo hi
>
> > then it works great.
>
> > Thanks.
>
> > interesting. :map <C-v><M-g> :echo hi works for me, but glad the latter
>
> solution worked out for you anyway.
>
> anyone have any insight into the discrepancy?
>
> --
> Christopher Suter
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to