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

Yanking between windows

Expand Messages
  • Raffi Khatchadourian
    Why has it never been possible to yank between multiple windows? -- You received this message from the vim_mac maillist. Do not top-post! Type your reply
    Message 1 of 4 , Nov 27, 2012
    • 0 Attachment
      Why has it never been possible to yank between multiple windows?

      --
      You received this message from the "vim_mac" 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
    • Darcy
      ... I am not sure exactly what you mean. Do you mean yank from one window and put in another? Or do you mean yank a bit of text from window and another
      Message 2 of 4 , Nov 29, 2012
      • 0 Attachment
        On Tuesday, November 27, 2012 8:42:41 PM UTC-5, Raffi Khatchadourian wrote:
        > Why has it never been possible to yank between multiple windows?

        I am not sure exactly what you mean. Do you mean yank from one window and put in another? Or do you mean yank a bit of text from window and another window? Also do you mean the OS's window or a window in vim?

        You can yank and put between windows. In a vim session just yank in one window and move to the other window and use put. If you are yanking and putting between OS windows, then you will have to use the * register. For example "*y in one vim session, then "*p in another vim session. For more information, try `:h gui_selections`

        If you are trying to yank pieces of text from 2 windows, then you probably want to first yank to a register such as "ay, then navigate to the other vim window and append to the a register using "Ay. (Note the capital letter appends to the letter's register whereas the lowercase letter overwrites it.) To learn more, run `:h quotea`

        --
        You received this message from the "vim_mac" 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
      • Kyle Lippincott
        To explain why, even in the same process you need to do tricks to get to different OS X windows: they aren t the same process. Each window is a separate vim
        Message 3 of 4 , Nov 29, 2012
        • 0 Attachment
          To explain why, even in the same 'process' you need to do tricks to get to different OS X windows: they aren't the same process.  Each window is a separate vim instance under the covers, thus yanking is local to that OS X window (the terminology gets confusing here, because 'window' typically means an area inside of vim where a buffer can be shown, so if you start vim, do :sp, you get two 'vim windows' inside of the single 'os x window', as I'm calling them).

          On Thu, Nov 29, 2012 at 8:05 AM, Darcy <darcyparker@...> wrote:
          On Tuesday, November 27, 2012 8:42:41 PM UTC-5, Raffi Khatchadourian wrote:
          > Why has it never been possible to yank between multiple windows?

          I am not sure exactly what you mean.  Do you mean yank from one window and put in another? Or do you mean yank a bit of text from window and another window?  Also do you mean the OS's window or a window in vim?

          You can yank and put between windows.  In a vim session just yank in one window and move to the other window and use put. If you are yanking and putting between OS windows, then you will have to use the * register.  For example "*y in one vim session, then "*p in another vim session.  For more information, try `:h gui_selections`

          If you are trying to yank pieces of text from 2 windows, then you probably want to first yank to a register such as "ay, then navigate to the other vim window and append to the a register using "Ay.  (Note the capital letter appends to the letter's register whereas the lowercase letter overwrites it.)  To learn more, run `:h quotea`

          --
          You received this message from the "vim_mac" 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 from the "vim_mac" 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
        • björn
          ... ...or do what I do: use the standard Apple shortcuts Cmd+c and Cmd+v to copy and paste between OS windows. If you insist on using y instead of Cmd+c but
          Message 4 of 4 , Nov 29, 2012
          • 0 Attachment
            On Thu, Nov 29, 2012 at 5:05 PM, Darcy wrote:
            > On Tuesday, November 27, 2012 8:42:41 PM UTC-5, Raffi Khatchadourian wrote:
            >> Why has it never been possible to yank between multiple windows?
            >
            > You can yank and put between windows. In a vim session just yank in one window and move to the other window and use put. If you are yanking and putting between OS windows, then you will have to use the * register. For example "*y in one vim session, then "*p in another vim session. For more information, try `:h gui_selections`

            ...or do what I do: use the standard Apple shortcuts Cmd+c and Cmd+v
            to copy and paste between OS windows.

            If you insist on using 'y' instead of Cmd+c but dislike having to
            remember to prefix with "* when yanking, then you should check out the
            'clipboard' option (e.g. ":set clipboard+=unnamed"). You'll still
            have to remember to paste from the star register as far as I can tell
            ("*p or Cmd+p).

            Björn

            --
            You received this message from the "vim_mac" 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
          Your message has been successfully submitted and would be delivered to recipients shortly.