Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to do Rectangular cut & Paste in VIM

797 views
Skip to first unread message

joe...@my-dejanews.com

unread,
Apr 8, 1999, 3:00:00 AM4/8/99
to
Hi folks :

Any idea how to do rectangular cut & paste in VIM.
Desperately need your help.

Thanks,
Joe

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

George R. Young

unread,
Apr 9, 1999, 3:00:00 AM4/9/99
to
Either ^v or 4 mouse clicks, make a box, delete with x, paste with p.


Regards,
George.

Even Holen

unread,
Apr 14, 1999, 3:00:00 AM4/14/99
to
Thus spoke George R. Young <ag...@freenet.carleton.ca>:

>Either ^v or 4 mouse clicks, make a box, delete with x, paste with p.
^^^^^^^^^^^^^^
Hey, do you mean VIM has started competing with Mac about
'who-can-use-many-mouse-clicks-as-a-command'? I've heard about
clicking, and double-clicks (and Mac's triple-click), but this is
the first quadruple-click I've heard about...

Hmmm... Could anybody tell me what 5, 6, 7, ... clicks means? I guess
somewhere along the way one have Mark-all-text-in-buffer? Maybe that's
aleph_0-clicks?

Regards,
Even Holen
beeing slightly sarchastic...
--
<>< Even Holen, ev...@pvv.ntnu.no, http://www.pvv.ntnu.no/~evenh/ :-)

brian hiles

unread,
May 5, 1999, 3:00:00 AM5/5/99
to
joe...@my-dejanews.com wrote:
> Any idea how to do rectangular cut & paste in VIM.
> Desperately need your help.

I could swear that the last time I looked in the "VI Lover's Home Page",
there was a macro package plus program that one could use to make
rectungular selections of text in vi/m, but I cannot find it.

Sven??

-Brian

Steffi Richter

unread,
May 5, 1999, 3:00:00 AM5/5/99
to
b...@rainey.blueneptune.com (brian hiles):

Use CTRL-v to highlight a rectangular block in vim. Then use delete (x)
and put (p) commands to do the cut and paste. This method is great for
swapping two columns of data, for example.

----Jon

Stan Brown

unread,
May 6, 1999, 3:00:00 AM5/6/99
to
[This followup was also e-mailed to the cited author for speed -- please
follow up in the newsgroup.]

Dixitque b...@rainey.blueneptune.com (brian hiles) in comp.editors:


>I could swear that the last time I looked in the "VI Lover's Home Page",
>there was a macro package plus program that one could use to make
>rectungular selections of text in vi/m, but I cannot find it.

There may have been, but in modern versions of Vim there's no need. From
normal mode, Ctrl-V starts a rectangular selection, just as V starts a
line-mode selection and v starts a character-mode selection.

(I may have the terminology a bit wrong, but you get the idea.)

--
There's no need to e-mail me a copy of a follow-up; but if you do,
please identify it as such.

Stan Brown, Oak Road Systems, Cleveland, Ohio, USA
http://www.mindspring.com/~brahms/
My reply address is correct as is. The courtesy of providing a correct
reply address is more important to me than time spent deleting spam.

0 new messages