- View SourceI found the nifty option
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?
- View SourceOn 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
- View SourceSome 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
:nmap <A-v> gg"_dG"*P
> -----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