> What is your 'winaltkeys' setting?

I'm using MacVim (gvim) on OS X 10.5.6.  If I enter

:verbose set wak?

I get a message saying "E519: Option not supported: wak?".

Thanks,

Ken


On Feb 28, 2:00 pm, Tony Mechelynck <[email protected]>
wrote:
> On 28/02/09 21:33, Kenneth R. Beesley wrote:
>
>
>
> > Hello Tony,
>
> > Thanks for the response.
>
> > In insert my comments inline:
>
> > On Feb 27, 9:31 pm, Tony Mechelynck<[email protected]>
> > wrote:
> >> 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.
>
> > KRB:   My system locale and the (g)vim encoding are UTF-8.
>
> >> 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,
>
> > KRB:  They are, in fact, in a keymap, namely my own
>
> > ~/.vim/keymap/hopi-postfix_utf-8.vim
>
> > I have created a number of such keymaps, all UTF-8, for Hopi
> > orthography/IPA, for English IPA, for Shavian and Deseret Alphabet,
> > and they work perfectly except for Alt-modified (<Alt-whatever>)
> > mappings.
> > If I change the<A-s>,<A-z>  and<A-r>  inputs to Cntl inputs (<C-s>,
> > <C-z>  and<C-r>, respectively) then they work perfectly.
>
> >> 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).
>
> > KRB:  The same hopi-postfix keymap has entries for equivalent letters,
> > but using
> > Combining Diacritical Marks, and using input sequences that make sense
> > to me, e.g.
>
> > loadkeymap
> > a`  a<char-0x0300>   " a followed by combining grave accent
> > e`  e<char-0x0300>
> > i`  i<char-0x0300>
> > o`  o<char-0x0300>
> > u`  u<char-0x0300>
>
> > a/  a<char-0x0301>   " a followed by combining acute accent
> > e/  e<char-0x0301>
> > i/  i<char-0x0301>
> > o/  o<char-0x0301>
> > u/  u<char-0x0301>
>
> > a^  a<char-0x0302>   " a followed by combining circumflex accent
> > e^  e<char-0x0302>
> > i^  i<char-0x0302>
> > o^  o<char-0x0302>
> > u^  u<char-0x0302>
>
> > o"  o<char-0x0308>   " o followed by combinine diaeresis
>
> > o"` o<char-0x0308><char-0x0300>   " o followed by combining diaeresis
> > and grave
> > o"/ o<char-0x0308><char-0x0301>
> > o"^ o<char-0x0308><char-0x0302>
>
> > etc.
>
> > They all work perfectly, as do the following three
>
> > " retroflex
> > <C-s>  <char-0x0282>   " LATIN SMALL LETTER S WITH HOOK
> > <C-z>  <char-0x0290>   " LATIN SMALL LETTER Z WITH RETROFLEX HOOK
> > <C-r>  <char-0x027D>   " LATIN SMALL LETTER R WITH TAIL
>
> > But if I change these last three to<A-s>,<A-z>  and<A-r>  (which is
> > what I really want), they don't work, even though I have
> > set guioptions-=m
>
> > in my .gvimrc.
>

>
>         :verbose set wak?
>
> If you want alt-keys to be never used for menus and always mappable, you
> should
>
>         set winaltkeys=no
>
> which is not the default.
>
> In that case you can still keep the menubar on (leave the m flag in
> 'guioptions') and access menus with the mouse, or even by keyboard by
> means of the ":emenu" command.
>
> The following allows using the Vim menus even in Console mode:
>
> if !has('gui_running')
>         runtime! menu.vim
>         " It's never done automatically in Console mode.
>         " For GUI mode the m flag of 'guioptions' does it.
>         " We assume that it's on.
> endif
> set wildmenu
> set wildcharm=<C-T> " or any key not needed in command-line mode
> map   <C-Z>  :emenu <C-T>
> imap  <C-Z>  <C-O>:emenu <C-T>
> " for the default meaning of Ctrl-Z (minimize) we can always use
> " :suspend
>
>
>
> > Thanks for your help,
>
> > Ken
>
> >> Best regards,
> >> Tony.
>
> --
> "You can't make a program without broken egos."
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to