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

almost there

Expand Messages
  • C. Porter Bassett
    I found the nifty option set guioptions+=a which makes it so that any sections highlighted visually will get copied to my clipboard, something that I have been
    Message 1 of 3 , Sep 30, 2002
    View Source
    • 0 Attachment
      I found the nifty option
      set guioptions+=a
      which makes it so that any sections highlighted visually will get copied
      to my clipboard, something that I have been wanting for a while.

      This had an unexpected consequence -- I can no longer replace an entire
      buffer with <C-A><C-V>, because the <C-A> replaces the buffer.

      Well, OK, I tried to work around it to make it copy the clipboard at the
      top of the file, then delete the rest of the file, then copy the
      original clipboard back into the clipboard. Here it is:
      map <A-v> ggO<C-v><Esc>VG<Exc>xggVG<Esc>

      This copies the current clipboard contents at the top of the file just
      fine, but it doesn't delete the current contents. Can anybody tell me
      what I have done wrong?
    • Alan G Isaac
      ... Perhaps I have not understood your goal here, but if I have how about ... Alan Isaac
      Message 2 of 3 , Oct 1, 2002
      View Source
      • 0 Attachment
        On Mon, 30 Sep 2002 07:00:53 -0600 "C. Porter Bassett" <cporter@...> wrote:
        > map <A-v> ggO<C-v><Esc>VG<Exc>xggVG<Esc>

        Perhaps I have not understood your goal here,
        but if I have how about
        :nmap <A-v> ggdG"*P

        Alan Isaac
      • Bouvier,Cedric,VEVEY,GL-IS/IT
        Some setups have it so that the vi selection goes immediately to the GUI clipboard. i.e., dG would crush the * register before it gets a chance of being
        Message 3 of 3 , Oct 2, 2002
        View Source
        • 0 Attachment
          Some setups have it so that the vi selection goes immediately to the GUI
          clipboard. i.e., dG would crush the "* register before it gets a chance of
          being pasted. You can avoid this by explicitly delete to the blackhole
          register ("_)

          :nmap <A-v> gg"_dG"*P

          --Cedric

          > -----Original Message-----
          > From: Alan G Isaac [mailto:aisaac@...]
          > Sent: Wednesday, October 02, 2002 4:20 AM
          > To: vim@...
          > Subject: Re: almost there
          >
          >
          > On Mon, 30 Sep 2002 07:00:53 -0600 "C. Porter Bassett"
          > <cporter@...> wrote:
          > > map <A-v> ggO<C-v><Esc>VG<Exc>xggVG<Esc>
          >
          > Perhaps I have not understood your goal here,
          > but if I have how about
          > :nmap <A-v> ggdG"*P
          >
          > Alan Isaac
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.