VI: cut/paste a marked block ?

VI: cut/paste a marked block ?

Post by sidds.. » Thu, 16 Dec 1999 04:00:00



anyone know how to do this?

I remember doing something like:
ma
mb
y'a'b

I dont want to use nyy.
Thanks!

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

VI: cut/paste a marked block ?

Post by Fletcher Glen » Thu, 16 Dec 1999 04:00:00



> anyone know how to do this?

> I remember doing something like:
> ma
> mb
> y'a'b

> I dont want to use nyy.
> Thanks!

> Sent via Deja.com http://www.deja.com/
> Before you buy.

If you're already at mark b, just y'a.  Yanking lines works
both forward and backward.  If you insist on going to "a"
first, then use: 'ay'b.

--
                Fletcher Glenn


 
 
 

VI: cut/paste a marked block ?

Post by Jobin Jam » Thu, 16 Dec 1999 04:00:00


you could mark just once (a)
go till the point where you want (b)

"hy'a

yank from where you are right now (b)
till point a. and put into register 'h'

for pasting:

position appropriately and

"hp

print whatever is in register 'h'.

you can use your own register name - a,b,c,....
i just used 'h'.


> anyone know how to do this?
> I remember doing something like:
> ma
> mb
> y'a'b
> I dont want to use nyy.
> Thanks!
> Sent via Deja.com http://www.deja.com/
> Before you buy.