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

Re: Question about communication with system clipboard

Expand Messages
  • Tony Mechelynck
    ... [...] Try copying into the + register (the CLIPBOARD) instead. That is what is used by Edit→Paste, Edit→Cut, Edit→Copy. Register * is the SELECTION,
    Message 1 of 8 , Sep 22, 2013
    • 0 Attachment
      On 22/09/13 11:01, Jacek Czaja wrote:
      > Hi,
      >
      > I 'm searching an advice on following problem: copying from vim to
      > system clipboard. and then using what i copied out of vim.
      >
      > What works for me:
      > 1) Start my gvim (configuration below) and i copy given line to * register
      > 2) I switch to terminal and insert Shift+Insert and I got it pasted
      > And it works like a charm.
      >
      > What does not work for me is:
      > 1) Start gvim, copy to * register
      > 2) Close gvim
      > 3) try to paste what I copied to clipboard from gvim before it was closed.
      >
      > And this does not work. So how can I make it work for me eg. copying to
      > system clipboard from vim , closing vim and then using copied value.
      >
      > I'm using gvim 7.4.27 from fedora 19 repo
      > configuration:
      > VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 11 2013 12:27:48)
      > Zadane łaty: 1-27
      > Zmieniony przez <bugzilla@... <mailto:bugzilla@...>>
      > Skompilowany przez <bugzilla@... <mailto:bugzilla@...>>
      > Olbrzymia wersja z GTK2 GUI. Opcje włączone (+) lub nie (-):
      [...]

      Try copying into the + register (the CLIPBOARD) instead. That is what is
      used by Edit→Paste, Edit→Cut, Edit→Copy.

      Register * is the SELECTION, filled in many programs by selecting text,
      and pasted by middle-click.

      Note that these two registers are different on X11 but not on Windows.


      Best regards,
      Tony.
      --
      The only qualities for real success in journalism are ratlike cunning, a
      plausible manner and a little literary ability. The capacity to steal
      other people's ideas and phrases ... is also invaluable.
      -- Nicolas Tomalin, "Stop the Press, I Want to Get On"

      --
      --
      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.
    • Gary Johnson
      ... An important difference between these two registers on X11 is that the primary selection (Vim s * register) is owned by the application, whereas the
      Message 2 of 8 , Sep 22, 2013
      • 0 Attachment
        On 2013-09-22, Tony Mechelynck wrote:
        > On 22/09/13 11:01, Jacek Czaja wrote:
        > >Hi,
        > >
        > >I 'm searching an advice on following problem: copying from vim to
        > >system clipboard. and then using what i copied out of vim.
        > >
        > >What works for me:
        > >1) Start my gvim (configuration below) and i copy given line to * register
        > >2) I switch to terminal and insert Shift+Insert and I got it pasted
        > > And it works like a charm.
        > >
        > >What does not work for me is:
        > >1) Start gvim, copy to * register
        > >2) Close gvim
        > >3) try to paste what I copied to clipboard from gvim before it was closed.
        > >
        > >And this does not work. So how can I make it work for me eg. copying to
        > >system clipboard from vim , closing vim and then using copied value.
        > >
        > >I'm using gvim 7.4.27 from fedora 19 repo
        > >configuration:
        > >VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 11 2013 12:27:48)
        > >Zadane łaty: 1-27
        > >Zmieniony przez <bugzilla@... <mailto:bugzilla@...>>
        > >Skompilowany przez <bugzilla@... <mailto:bugzilla@...>>
        > >Olbrzymia wersja z GTK2 GUI. Opcje włączone (+) lub nie (-):
        > [...]
        >
        > Try copying into the + register (the CLIPBOARD) instead. That is what
        > is used by Edit→Paste, Edit→Cut, Edit→Copy.
        >
        > Register * is the SELECTION, filled in many programs by selecting
        > text, and pasted by middle-click.
        >
        > Note that these two registers are different on X11 but not on Windows.

        An important difference between these two registers on X11 is that
        the primary selection (Vim's * register) is owned by the
        application, whereas the clipboard (Vim's + register) is owned by
        the X server. The contents of the primary selection disappear when
        the application owning that memory is terminated.

        See

        :help x11-selection
        :help gui-selections

        Regards,
        Gary

        --
        --
        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.
      • Jacek Czaja
        Hi, Thanks for all responses. I tried with + register but results are still not good eg. When I close Vim (gVim) I loose information from clipboard. Actually
        Message 3 of 8 , Sep 25, 2013
        • 0 Attachment
          Hi,

          Thanks for all responses. I tried with "+ register but results are still not good eg. When I close Vim (gVim) I loose information from clipboard.

          Actually so far I tried on my Fedora (gVim 7.4 Huge), Ubuntu 12.04 (gVim 7.3 1-429 Huge) and Windows7 (gVim7.4) and it worked only on windows.
          On windows I was able to copy to "* , close gvim and then with mouse paste information i copied to "* to my browser.

          On Linux it did not work so far ( I tried with "+ and "*).

          I read in pointed manual (x11-selection) that before vim is closed/suspended it should copy "+ into CUT_BUFFER0 so information is not lost.

          I tried xsel application that can manipulate PRIMARY,SECONDARY,CLIPBOARD registers eg. I can look what it is stored in them and put some content there. And when I close my gVim and there I print CLIPBOARD or any other there is nothing there ,although it was expected content there when gVim was running.

          I would be grateful for some more suggesstions

          Regards,
          Jacek


          On Monday, September 23, 2013 6:48:25 AM UTC+2, Gary Johnson wrote:
          > On 2013-09-22, Tony Mechelynck wrote:
          >
          > > On 22/09/13 11:01, Jacek Czaja wrote:
          >
          > > >Hi,
          >
          > > >
          >
          > > >I 'm searching an advice on following problem: copying from vim to
          >
          > > >system clipboard. and then using what i copied out of vim.
          >
          > > >
          >
          > > >What works for me:
          >
          > > >1) Start my gvim (configuration below) and i copy given line to * register
          >
          > > >2) I switch to terminal and insert Shift+Insert and I got it pasted
          >
          > > > And it works like a charm.
          >
          > > >
          >
          > > >What does not work for me is:
          >
          > > >1) Start gvim, copy to * register
          >
          > > >2) Close gvim
          >
          > > >3) try to paste what I copied to clipboard from gvim before it was closed.
          >
          > > >
          >
          > > >And this does not work. So how can I make it work for me eg. copying to
          >
          > > >system clipboard from vim , closing vim and then using copied value.
          >
          > > >
          >
          > > >I'm using gvim 7.4.27 from fedora 19 repo
          >
          > > >configuration:
          >
          > > >VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 11 2013 12:27:48)
          >
          > > >Zadane łaty: 1-27
          >
          > > >Zmieniony przez <bugzilla@... <mailto:bugzilla@...>>
          >
          > > >Skompilowany przez <bugzilla@... <mailto:bugzilla@...>>
          >
          > > >Olbrzymia wersja z GTK2 GUI. Opcje włączone (+) lub nie (-):
          >
          > > [...]
          >
          > >
          >
          > > Try copying into the + register (the CLIPBOARD) instead. That is what
          >
          > > is used by Edit→Paste, Edit→Cut, Edit→Copy.
          >
          > >
          >
          > > Register * is the SELECTION, filled in many programs by selecting
          >
          > > text, and pasted by middle-click.
          >
          > >
          >
          > > Note that these two registers are different on X11 but not on Windows.
          >
          >
          >
          > An important difference between these two registers on X11 is that
          >
          > the primary selection (Vim's * register) is owned by the
          >
          > application, whereas the clipboard (Vim's + register) is owned by
          >
          > the X server. The contents of the primary selection disappear when
          >
          > the application owning that memory is terminated.
          >
          >
          >
          > See
          >
          >
          >
          > :help x11-selection
          >
          > :help gui-selections
          >
          >
          >
          > Regards,
          >
          > Gary

          --
          --
          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.
        • Nikolay Pavlov
          ... register ... closed. ... to ... They are all owned by the application. This fact may be hidden by various clipboard managers though: they obtain the
          Message 4 of 8 , Sep 25, 2013
          • 0 Attachment


            On Sep 23, 2013 8:48 AM, "Gary Johnson" <garyjohn@...> wrote:
            >
            > On 2013-09-22, Tony Mechelynck wrote:
            > > On 22/09/13 11:01, Jacek Czaja wrote:
            > > >Hi,
            > > >
            > > >I 'm searching an advice on following problem: copying from vim to
            > > >system clipboard. and then using what i copied out of vim.
            > > >
            > > >What works for me:
            > > >1) Start my gvim (configuration below) and i copy given line to * register
            > > >2) I switch to terminal  and insert Shift+Insert and I got it pasted
            > > >  And it works like a charm.
            > > >
            > > >What does not work for me is:
            > > >1) Start gvim, copy to * register
            > > >2) Close gvim
            > > >3) try to paste what I copied to clipboard from gvim before it was closed.
            > > >
            > > >And this does not work.  So how can I make it work for me eg. copying to
            > > >system clipboard from vim , closing vim and then using copied value.
            > > >
            > > >I'm using gvim 7.4.27 from fedora 19 repo
            > > >configuration:
            > > >VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 11 2013 12:27:48)
            > > >Zadane łaty: 1-27
            > > >Zmieniony przez <bugzilla@... <mailto:bugzilla@...>>
            > > >Skompilowany przez <bugzilla@... <mailto:bugzilla@...>>
            > > >Olbrzymia wersja z GTK2 GUI.  Opcje włączone (+) lub nie (-):
            > > [...]
            > >
            > > Try copying into the + register (the CLIPBOARD) instead. That is what
            > > is used by Edit→Paste, Edit→Cut, Edit→Copy.
            > >
            > > Register * is the SELECTION, filled in many programs by selecting
            > > text, and pasted by middle-click.
            > >
            > > Note that these two registers are different on X11 but not on Windows.
            >
            > An important difference between these two registers on X11 is that
            > the primary selection (Vim's * register) is owned by the
            > application, whereas the clipboard (Vim's + register) is owned by
            > the X server.  The contents of the primary selection disappear when
            > the application owning that memory is terminated.

            They are all owned by the application. This fact may be hidden by various clipboard managers though: they obtain the clipboard and repost it from their name thus becoming owners themselves. As clipboard manager is a daemon that normally does not stop it looks like if clipboard buffer is owned by X server, but it is not.

            > See
            >
            >     :help x11-selection
            >     :help gui-selections
            >
            > Regards,
            > Gary
            >
            > --
            > --
            > 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.

            --
            --
            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.
          • tooth pik
            ... I use openSUSE. For me the application I had to install is named clipboard . When it runs it puts a paperclip icon in the default panel. I suspect it
            Message 5 of 8 , Sep 25, 2013
            • 0 Attachment
              On Wed, Sep 25, 2013 at 02:22:09AM -0700, Jacek Czaja wrote:
              > Hi,

              > Thanks for all responses. I tried with "+ register but results are
              > still not good eg. When I close Vim (gVim) I loose information from
              > clipboard.

              > Actually so far I tried on my Fedora (gVim 7.4 Huge), Ubuntu 12.04
              > (gVim 7.3 1-429 Huge) and Windows7 (gVim7.4) and it worked only on
              > windows. On windows I was able to copy to "* , close gvim and then
              > with mouse paste information i copied to "* to my browser.

              > On Linux it did not work so far ( I tried with "+ and "*).

              > I read in pointed manual (x11-selection) that before vim is
              > closed/suspended it should copy "+ into CUT_BUFFER0 so information is
              > not lost.

              > I tried xsel application that can manipulate
              > PRIMARY,SECONDARY,CLIPBOARD registers eg. I can look what it is stored
              > in them and put some content there. And when I close my gVim and there
              > I print CLIPBOARD or any other there is nothing there ,although it
              > was expected content there when gVim was running.

              > I would be grateful for some more suggesstions

              I use openSUSE. For me the application I had to install is named
              "clipboard". When it runs it puts a paperclip icon in the default
              panel. I suspect it is be called "clipboard" for other variants of
              linux as well.

              With clipboard running the contents of the system clipboard are
              preserved even when the creating application is ended, and will be
              available for pasting in other applications.

              hth,

              --
              _|_ _ __|_|_ ._ o|
              |_(_)(_)|_| ||_)||<
              |

              --
              --
              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.
            • Nikolay Pavlov
              ... In Gentoo there are klipper and possibly qlipper, wmcliphist and clipbook for this job, but no clipboard . (Possibly = I deduced their purpose from their
              Message 6 of 8 , Sep 25, 2013
              • 0 Attachment


                On Sep 25, 2013 3:34 PM, "tooth pik" <toothpik6@...> wrote:
                >
                > On Wed, Sep 25, 2013 at 02:22:09AM -0700, Jacek Czaja wrote:
                > > Hi,
                >
                > > Thanks for all responses. I tried with "+ register but results are
                > > still not good eg. When I close Vim (gVim) I loose information from
                > > clipboard.
                >
                > > Actually so far I tried on my Fedora (gVim 7.4 Huge), Ubuntu 12.04
                > > (gVim 7.3 1-429 Huge) and Windows7 (gVim7.4) and it worked only on
                > > windows. On windows I was able to copy to "* , close gvim and then
                > > with mouse paste information i copied to "* to my browser.
                >
                > > On Linux it did not work so far ( I tried with "+ and "*).
                >
                > > I read in pointed manual (x11-selection) that before vim is
                > > closed/suspended it should copy "+ into CUT_BUFFER0  so information is
                > > not lost.
                >
                > > I tried xsel application that can manipulate
                > > PRIMARY,SECONDARY,CLIPBOARD registers eg. I can look what it is stored
                > > in them and put some content there. And when I close my gVim and there
                > > I print CLIPBOARD or any other  there is nothing there ,although it
                > > was expected content there when gVim was running.
                >
                > > I would be grateful for some more suggesstions
                >
                > I use openSUSE.  For me the application I had to install is named
                > "clipboard".  When it runs it puts a paperclip icon in the default
                > panel.  I suspect it is be called "clipboard" for other variants of
                > linux as well.

                In Gentoo there are klipper and possibly qlipper, wmcliphist and clipbook for this job, but no "clipboard". (Possibly = I deduced their purpose from their description, but am not using them myself.) There should be also a GTK/GNOME program g* that does same job, but I do not remember how it was called.

                > With clipboard running the contents of the system clipboard are
                > preserved even when the creating application is ended, and will be
                > available for pasting in other applications.
                >
                > hth,
                >
                > --
                > _|_ _  __|_|_ ._ o|
                >  |_(_)(_)|_| ||_)||<
                >               |
                >
                > --
                > --
                > 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.

                --
                --
                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.