Sunday, August 19, 2012

Using Alt in my keymaps and utf-8

Hello all.
I am trying to do some keymappings to keys combinations which uses the Alt key.
My problem is that, except for Alt-[Left|right|Up|Down] combination, any other combination I try like, Alt-= (M-=),
Alt-t(M-t), etc ...
Seems to be recognized as utf characters, so for instance <C-M-w> is recognized as <97> when I check my keymaps using the :map command.
Similar thing happens to <M-t> which is recognized as an O with a hat symbol on it.
So seems my Alt combination are mapped to utf characters rather than the real keyboard keys.
I have been looking into google and seems vim always translates this combination of Alt keys to UTF characters.
I understand that this is done while in insert mode, but why the map nmap command precessed <M-t> as an UTF character when I put something like:
nmap <silent> <M-t> <C-W>v
In my .vimrc?
Is there  any reliable method to use Alt keymaps that works in both vim and gvim and for Linux and Mac?

Thanks.
--
Un saludo
Best Regards
Pablo Giménez

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment