Loading ...
Sorry, an error occurred while loading the content.

71638Re: imaps don't work with keymap=hebrew

Expand Messages
  • Nikolay Pavlov
    Jun 28, 2013
    • 0 Attachment


      On Jun 29, 2013 1:04 AM, "Bram Moolenaar" <Bram@...> wrote:
      >
      >
      > ZyX wrote:
      >
      > > Steps to reproduce:
      > >
      > >     vim -u NONE -c 'set keymap=hebrew' -c 'inoremap ,, \' -s <(<<< $'i,,\e')
      > >
      > > . Expected output is
      > >
      > >     \
      > >
      > > in buffer, actually seen
      > >
      > >     תת
      > >
      > > . If you use my patch and add `-c 'set wgm'` you will see what was
      > > expected. Likely the same prior to vim-7.3.1179.
      >
      >
      > So the problem is that you have both:
      >
      >         :imap ,
      >         i  ,,          * '
      >         :lmap ,
      >         l  ,           *@ת
      >
      > If you remove the last then the other works again:
      >
      >         :lunmap <buffer> ,
      >
      > So, you have conflicting mappings.  The problem is that you didn't
      > explicitly specify one of them.  We could not do this for lmaps.
      >
      > Try this patch:
      >
      > *** ../vim-7.3.1257/src/getchar.c       2013-06-12 21:00:18.000000000 +0200
      > --- src/getchar.c       2013-06-28 21:29:14.000000000 +0200
      > ***************
      > *** 2134,2141 ****
      >                             if (expecting_global_mappings && mp2 == NULL)
      >                             {
      >                                 /* This is the first global mapping. If we've
      > !                                * got a complete buffer-local match, use it. */
      > !                               if (mp_match)
      >                                     break;
      >                                 expecting_global_mappings = FALSE;
      >                             }
      > --- 2135,2144 ----
      >                             if (expecting_global_mappings && mp2 == NULL)
      >                             {
      >                                 /* This is the first global mapping. If we've
      > !                                * got a complete buffer-local match that is
      > !                                * not from lmap, use it. */
      > !                               if (mp_match != NULL
      > !                                        && (mp_match->m_mode & LANGMAP) == 0)
      >                                     break;
      >                                 expecting_global_mappings = FALSE;
      >                             }

      This won't work if I have two *maps: buffer-local and global. One example is translit3 and various leader mappings (translit3 maps nearly any ASCII printable character including backslash and comma). Second is using quickfix and q as a leader. Guess more will emerge as users update.

      We do need an option.

      > --
      > 'I generally avoid temptation unless I can't resist it."
      >                 -- Mae West
      >
      >  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
      > ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      > \\\  an exciting new programming language -- http://www.Zimbu.org        ///
      >  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
      >
      > --
      > --
      > You received this message from the "vim_dev" 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
      >
      > ---
      > You received this message because you are subscribed to the Google Groups "vim_dev" group.
      > To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      > For more options, visit https://groups.google.com/groups/opt_out.
      >
      >

      --
      --
      You received this message from the "vim_dev" 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
       
      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
       
       
    • Show all 12 messages in this topic