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

Surprised that "gi" doesn't modify the jumplist

Expand Messages
  • Tim Chase
    Playing around with the latest VimGolf challenge[1], I was attempting to use gi to add some text, then control+O (or backtick-backtick) to jump back to where
    Message 1 of 3 , Sep 23, 2013
    • 0 Attachment
      Playing around with the latest VimGolf challenge[1], I was attempting
      to use "gi" to add some text, then control+O (or backtick-backtick) to
      jump back to where I had issued the "gi". I was somewhat surprised to
      find that "gi" doesn't modify the jump-list, even though it can
      generate some pretty large jumps, losing the previous location in the
      process.

      Is this non-jumplist behavior intentional or just accidental omission?

      -tim

      [1]
      http://www.vimgolf.com/challenges/52409a089e26e1000200006d




      --
      --
      You received this message from the "vim_use" 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_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Christian Brabandt
      Hi Tim! ... Not sure, but it sounds like a good idea, to add the current position to the jumplist. So here is a patch, to add this function. regards, Christian
      Message 2 of 3 , Sep 24, 2013
      • 0 Attachment
        Hi Tim!

        On Mo, 23 Sep 2013, Tim Chase wrote:

        > Playing around with the latest VimGolf challenge[1], I was attempting
        > to use "gi" to add some text, then control+O (or backtick-backtick) to
        > jump back to where I had issued the "gi". I was somewhat surprised to
        > find that "gi" doesn't modify the jump-list, even though it can
        > generate some pretty large jumps, losing the previous location in the
        > process.

        Not sure, but it sounds like a good idea, to add the current position to
        the jumplist. So here is a patch, to add this function.

        regards,
        Christian
        --
        Vollkommenheit ist schon da, wenn das Notwendige geleistet
        wird, Schönheit, wenn das Notwendige geleistet, doch verborgen ist.
        -- Goethe, Maximen und Reflektionen, Nr. 1197

        --
        --
        You received this message from the "vim_use" 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_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Bram Moolenaar
        ... I hesitate to include this, because I expect some plugins to use this. e.g. to drop out of insert mode, do some stuff (grab a word from somewhere else in
        Message 3 of 3 , Sep 25, 2013
        • 0 Attachment
          Christian Brabandt wrote:

          > Hi Tim!
          >
          > On Mo, 23 Sep 2013, Tim Chase wrote:
          >
          > > Playing around with the latest VimGolf challenge[1], I was attempting
          > > to use "gi" to add some text, then control+O (or backtick-backtick) to
          > > jump back to where I had issued the "gi". I was somewhat surprised to
          > > find that "gi" doesn't modify the jump-list, even though it can
          > > generate some pretty large jumps, losing the previous location in the
          > > process.
          >
          > Not sure, but it sounds like a good idea, to add the current position to
          > the jumplist. So here is a patch, to add this function.

          I hesitate to include this, because I expect some plugins to use this.
          e.g. to drop out of insert mode, do some stuff (grab a word from
          somewhere else in the file) and then "gi" to resume inserting. In that
          case adding a jump is not what one expects.

          We could add the jump when "gi" was typed instead of coming from a
          script or mapping, but that makes it a bit unpredictable.


          --
          In war we're tough and able.
          Quite indefatigable
          Between our quests
          We sequin vests
          And impersonate Clark Gable
          It's a busy life in Camelot.
          I have to push the pram a lot.
          "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

          /// 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_use" 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_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.