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

Re: put (paste) from windows clipboard into vim

Expand Messages
  • Tim Chase
    ... This is nice when you want it, but I find it frequently annoying when I do anything that happens to delete in the process...like ciw to change the current
    Message 1 of 7 , Jun 1, 2006
      > So just put "set clipboard=unnamed" in your vimrc file, use y
      > and p as normal, and watch them yank to and put from the
      > system clipboard! Woo!


      This is nice when you want it, but I find it frequently annoying
      when I do anything that happens to delete in the process...like

      ciw

      to change the current word under the cursor. It tromps over my
      system clipboard, replacing it with the word I've removed. I
      tend to like to keep things of importance in my system clipboard,
      and I'm all to prone to making edits in Vim that would tromp on
      my clipboard.

      At least Vim offers the option, unlike most other editors. :)

      So use it if you like, but be forewarned :)

      -tim
    • Max Dyckhoff
      That seems like a fair warning, although I will say that I have never run into such a problem. I don t tend to keep things in the clipboard for very long at
      Message 2 of 7 , Jun 1, 2006
        That seems like a fair warning, although I will say that I have never
        run into such a problem. I don't tend to keep things in the clipboard
        for very long at all, normally just to move from one place to another.
        If I do want them to be around for a while then I generally want them to
        be around for A Long Time, and so I put them in a named buffer so that
        nothing can stomp on them.

        Choose whatever is better for your workflow, is the solution!

        Max

        > -----Original Message-----
        > From: Tim Chase [mailto:vim@...]
        > Sent: Thursday, June 01, 2006 8:47 AM
        > To: Max Dyckhoff
        > Cc: evan@...; vim@...
        > Subject: Re: put (paste) from windows clipboard into vim
        >
        > > So just put "set clipboard=unnamed" in your vimrc file, use y
        > > and p as normal, and watch them yank to and put from the
        > > system clipboard! Woo!
        >
        >
        > This is nice when you want it, but I find it frequently annoying
        > when I do anything that happens to delete in the process...like
        >
        > ciw
        >
        > to change the current word under the cursor. It tromps over my
        > system clipboard, replacing it with the word I've removed. I
        > tend to like to keep things of importance in my system clipboard,
        > and I'm all to prone to making edits in Vim that would tromp on
        > my clipboard.
        >
        > At least Vim offers the option, unlike most other editors. :)
        >
        > So use it if you like, but be forewarned :)
        >
        > -tim
        >
        >
      • A.J.Mechelynck
        ... [...] I knew about that but I somehow forgot to mention it (though maybe I should have), because most of my puts and yanks are internal to Vim and I don t
        Message 3 of 7 , Jun 1, 2006
          Max Dyckhoff wrote:
          > Prefixing the yank and put commands with registers works, but I personally prefer the following, which just sets the default register to be the system clipboard. From :help clipboard,
          >
          > When the "unnamed" string is included in the 'clipboard' option, the
          > Unnamed register is the same as the "* register. Thus you can yank to
          > and paste the selection without prepending "* to commands.
          >
          > So just put "set clipboard=unnamed" in your vimrc file, use y and p as normal, and watch them yank to and put from the system clipboard! Woo!
          >
          > Max
          >
          >
          [...]

          I knew about that but I somehow forgot to mention it (though maybe I
          should have), because most of my puts and yanks are internal to Vim and
          I don't like clobbering the system clipboard in that case. "De gustibus
          et coloribus non est disputandum."


          Best regards,
          Tony.
        Your message has been successfully submitted and would be delivered to recipients shortly.