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

RE: recursive imap

Expand Messages
  • Bram Moolenaar
    ... If you look closely at maxmapdepth , it mentions that it only works for the depth used within obtaining one character. Since the first resulting isn t
    Message 1 of 9 , Jun 28, 2002
    • 0 Attachment
      Vipin Aravind wrote:

      > > inoremap " ""

      > Great but shouldn't imap come out with an error
      > after recursing maxmapdepth times.

      If you look closely at 'maxmapdepth', it mentions that it only works
      for the depth used within obtaining one character. Since the first
      resulting " isn't mapped (because it matches the 'from' part), you
      obtain a " and the next " is expanded to "" again, of which you use the
      first ", etc.

      It's very difficult to avoid this. Would require remembering a map
      depth for each character in the input buffer. I don't think it's worth
      it. You can hit CTRL-C and fix the mapping.

      --
      The question is: What do you do with your life?
      The wrong answer is: Become the richest guy in the graveyard.
      (billionaire and Oracle founder Larry Ellison)

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.