On 27/02/09 19:20, Kenneth Reid Beesley wrote:
>
> I'm using gvim 7.2 on OS X 10.5.6.
>
> When using gvim and keymaps, one can allegedly define mappings using
> Alt-modified keys using the<A-x>  syntax.
>
> However, the gvim GUI normally uses Alt-modified keystrokes, so to
> avoid having the gvim GUI intercept the Alt-modified keystrokes, one
> needs to specify
>
> set guioptions-=m
>
> Do I assume correctly that   'set guioptions-=m' should appear
> in .vimrc or .gvimrc?  I've got it in my .gvimrc file, but
>
> " retroflex
> <A-s>  <char-0x0282>
> <A-z>  <char-0x0290>
> <A-r>  <char-0x027D>
>
> don't work for me.   It seems like they're still being caught as
> commands by the GUI.  The Cntrl-modified syntax (e.g.<C-s>) works fine.
>
> What am I doing wrong?
>
> Thanks,
>
> Ken

To define those mappings, you should first have made sure that 
'encoding' has already been set to UTF-8 if the current Vim version 
supports it. How to do so can be explained, but it falls outside the 
scope of the present reply.

Then you should define them has follows:

if has('multi_byte')
        map     <A-s>   <Char-0x0282>
        "       LATIN SMALL LETTER S WITH HOOK

        map     <A-z>   <Char-0x0290>
        "       LATIN SMALL LETTER Z WITH RETROFLEX HOOK

        map     <A-r>   <Char-0x027D>
        "       LATIN SMALL LETTER R WITH TAIL
endif

Notes:
- It might be better to define these in a keymap, or by using lmap 
rather than map. The keymap, if used, should have utf-8 in its name, for 
instance keymap/imaginarylanguage_utf-8.vim. In a keymap, after the 
"loadkeymap" line, the lines you wrote are correct, but they would 
benefit by a comment at the end.
- Instead of :map, you might want :map!, :imap, etc., see ":help 
map-overview"
- In Vim, Alt-r, Alt-s, Alt-z are respectively synonymous with ò LATIN 
SMALL LETTER O WITH GRAVE, ó LATIN SMALL LETTER O WITH ACUTE, and ú 
LATIN SMALL LETTER U WITH ACUTE, so if you need these it's a bad idea to 
use Alt-r Alt-s and Alt-z for the {lhs} of a mapping except in a keymap 
or lmap (which can be turned on and off at any moment).


Best regards,
Tony.
-- 
He played the king as if afraid someone else would play the ace.
                -- John Mason Brown, drama critic

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

Reply via email to