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

How to add content to register instead of replace the old

Expand Messages
  • Sgra Ekim
    Hi, all I want it functions like this, when I press yy or yaw I can add the yanked content to the default register but not replace the old content, the
    Message 1 of 3 , Mar 19, 2014
    • 0 Attachment
      Hi, all
      I want it functions like this, when I press \yy or \yaw
      I can add the yanked content to the default register but not replace the old content, the leader \ indicate a special yank mode, and all the yank commands should work in this mode.

      Have someone have any ideas?
      Thank you.

      --
      --
      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/d/optout.
    • Tim Chase
      ... The standard/default register doesn t allow for easy appending. However, if you name a register, you can then append to it by using the capital version of
      Message 2 of 3 , Mar 19, 2014
      • 0 Attachment
        On 2014-03-20 01:55, Sgra Ekim wrote:
        > I want it functions like this, when I press \yy or \yaw
        > I can add the yanked content to the default register but not
        > replace the old content, the leader \ indicate a special yank mode,
        > and all the yank commands should work in this mode.

        The standard/default register doesn't allow for easy appending.
        However, if you name a register, you can then append to it by using
        the capital version of the same letter:

        "aY yank the current line into register "a"
        5j move around somewhere
        "AY yank the current line into register "a", appending

        I'm not sure what your "\y" mapping does, but if it accepts arbitrary
        registers, this should work for you.

        -tim


        --
        --
        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/d/optout.
      • Sgra Ekim
        I want an append mode, whatever its key mapping, when in this mode current content should be appended to the register. the are a lot of yank command and I dont
        Message 3 of 3 , Mar 20, 2014
        • 0 Attachment
          I want an append mode, whatever its key mapping, when in this mode current content should be appended to the register.
          the are a lot of yank command and I dont want to give each one an map.

          I'm not sure it's possible?



          2014-03-20 2:10 GMT+08:00 Tim Chase <vim@...>:
          On 2014-03-20 01:55, Sgra Ekim wrote:
          > I want it functions like this, when I press \yy or \yaw
          > I can add the yanked content to the default register but not
          > replace the old content, the leader \ indicate a special yank mode,
          > and all the yank commands should work in this mode.

          The standard/default register doesn't allow for easy appending.
          However, if you name a register, you can then append to it by using
          the capital version of the same letter:

            "aY        yank the current line into register "a"
            5j         move around somewhere
            "AY        yank the current line into register "a", appending

          I'm not sure what your "\y" mapping does, but if it accepts arbitrary
          registers, this should work for you.

          -tim


          --
          --
          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/d/optout.

          --
          --
          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/d/optout.
        Your message has been successfully submitted and would be delivered to recipients shortly.