[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inserting text of arbitrary length before rectangular region

From: Paul Fox
Subject: Re: Inserting text of arbitrary length before rectangular region
Date: Thu, 05 Mar 2020 11:23:50 -0500

gerard wrote:
 > I'm having difficulty understanding rectangular regions.
 > Let's say I want to enter the text "Name of applicant: " at the
 > beginning of each line below:
 > John
 > Henry
 > Mike
 > Tom
 > Positioning the cursor at the first character on line 1, I create a
 > rectangular region with 3q3jq
 > I then do c^S and at the prompt I enter "Name of applicant: " (without
 > quotation marks), but only the first letter N is entered.
 > Have I misunderstood what should happen here?

Your expectations were fine, it just doesn't work that way.  It
probably should, but I must have thought it was too hard at the time.

A rectangular 'c'hange command will only operate _inside_ of the defined
rectangle -- it can't expand that rectangle.  There should really be
a rectangular 'i'nsert command, to do what you're trying to do.

What I do is first open the rectangle I need, either with ^A-r, or
simply by shift the lines over, mark a corner with 'ma', then go to
the far corner to change it with 'c`a'.  Or you could sweep it out with 'q'.
If I opened the space too big, I then have to trim it back down. 
Clumsy, I know.

Maybe someone else has a better way.

paul fox, address@hidden (arlington, ma, where it's 45.7 degrees)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]