Topic: Using Columnar Blocks to Open Whitespace (1 of 2), Read 16 times
Conf: Basic editing, Block operations
From: Jack Williamson
Date: Saturday, January 26, 2008 09:49 PM

Suppose I've opened a width-1 columnar block (Alt-I) in the middle of a text file and extended my block downward to a length of, say, 10 rows.

Now I can extend my block rightward using the right cursor key or the space key. If I use the cursor key the block paints over the existing text without altering its position. If I use the space bar the top 9 rows of my block advance rightward leaving the underlying text in place, but the 10th row, where the cursor is located, pushes text to the right.

In some editors, using the space bar would push _all ten rows_ of text to the right, opening a rectangular whitespace region in the file. I find this to be very useful behavior sometimes. Can Vedit's column block behavior be configured to work this way?

Thanks.

 


Topic: Using Columnar Blocks to Open Whitespace (2 of 2), Read 8 times
Conf: Basic editing, Block operations
From: Pauli Lindgren
Date: Thursday, January 31, 2008 10:50 AM

On 1/26/2008 9:49:56 PM, Jack Williamson wrote:
>
> In some editors, using the space bar would push _all ten
> rows_ of text to the right, opening a rectangular
> whitespace region in the file.
> I find this to be very useful behavior sometimes.
> Can Vedit's column block behavior be configured
> to work this way?

I don't think there is such configuration option.
But you could use the following kludge:

Reconfigure the space key by adding the following line in your keyboard configuration file:

[VISUAL EXIT]IC(' ') if(BB>-1 && BM==COLUMN){#12=CL GP(BB) #10=CN While(CL<#12){IC(' ') L GC(#10)}}

The line must begin with space (since that is the key you are configuring), followed by at least one TAB or two spaces, and then the code above. (You can not see the spaces here since WebBoard removes any spaces at the beginning of line.)

However, this may cause some problems, at least in command mode window (the whole command string is entered instead of space). So a better solution might be to use a template editing event macro.

While testing the above, I found an error in Vedit macro language. I tried to change IC(' ') into IC(' ',IM) so that overwrite mode would work correctly. However, this does not work. It seems that Insert_Mode command does not return the current value of Insert Mode (as it is told in the Help), but instead just displays the value.

--
Pauli

P.S. If you want to add the spaces at the beginning of line, you can use Indent (F8).