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

72635Re: language-mapping is not applied to macro

Expand Messages
  • Tony Mechelynck
    Aug 3 9:46 PM
    • 0 Attachment
      On 03/08/13 21:57, Bram Moolenaar wrote:
      >
      > Ron Aaron wrote:
      >
      >> On Friday, August 2, 2013 9:16:41 PM UTC+3, Bram Moolenaar wrote:
      >>> Ron Aaron wrote:
      >>
      >>>
      >>> :lmap is only for typed characters. From the help:
      >>
      >> No, that's not my problem. I'm attaching a file which demonstrates
      >> the exact problem, if you do "gvim -u test.vim", and then in insert
      >> mode type the "'" (single-quote) character, you will get a message.
      >> If you then type ":HebrewWin" and type the 'w' character (which is
      >> lmapped to "'" on a Hebrew keyboard) you will see the single-quote,
      >> but no message. Similarly if you type a single-quote (which gives you
      >> a comma), you get no message.
      >
      > It appears you expect lmap's to be remappable. If you look at the
      > output of ":lmap" you can see they are listed with a star, which means
      > they are not remappable.

      Oh, but what is the difference between :lmap and :lnoremap then? Under
      ":help :lmap", I read: “The result, including {rhs}, is then further
      scanned for mappings.” which would make me believe that :lmap is
      remappable (and that :lnoremap is not).

      However, this ought not even to come into play here, since the problem
      is not about scanning (or not) the {rhs} of the :lmap, but the output of
      @a. Under ":help @" it is said: “The register is executed like a
      mapping, that means that the difference between 'wildchar' and
      'wildcharm' applies.” What it doesn't say is that it is executed like a
      _non-remappable_ mapping, which seems to be the case: when 'iminsert' is
      1, [ typed at the keyboard appears as {{{ (the :lmap has been triggered)
      but [ input by executing @a remains [ (it hasn't).

      >
      > The problem wht remapping is that you nearly always get a recursive
      > sequence, since the character that :lmap maps to usually is lmap'ped to
      > something else.
      >
      > Solving this would require another kind of mapping: don't allow :lmap
      > remapping but do allow other remapping.

      That already exists (but doesn't work, see above): "don't allow lnoremap
      (or keymap lines) remapping but do allow lmap remapping".


      Best regards,
      Tony.
      --
      Give me the Luxuries, and the Hell with the Necessities!

      --
      --
      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 14 messages in this topic