VEDIT works manipulate columns of text, a “columnar block” is a rectangle of characters in your file. It can be anywhere from one character wide to the full width of the text being edited and also extend from as little as one line to many pages in length. All of vEdit's block operations work with columnar blocks, also you can restrict a search/replace operation to the columnar block.
Columnar blocks are especially convenient for editing tabular data such as a spreadsheet or a database. For example, you could copy a table of numbers, say between lines 10 and 20 and between columns 30 and 40 to a text register. This columnar block of numbers can then be inserted anywhere else. To make columnar block operations as simple and useful as possible, VEDIT performs some additional manipulations on your text.
- It ensures that the columnar block being copied has a flush right margin. If any lines being copied are shorter than the block’s right margin, they are padded with spaces to make them flush. This ensures that when the columnar block is inserted, it does not destroy the alignment of the following text.
- Similarly, when inserting a columnar block, spaces are added to pad short text lines which do not reach the insertion column. This keeps the inserted text aligned.
- Any Tab characters in the columnar block being copied are converted to spaces. (This is necessary for columnar operations to work as expected.) When the columnar block is inserted, you can select with CONFIG > Tab / Fill > Retab after columnar operation whether these spaces (and adjacent spaces in the existing text) are retabbed to the optimum number of Tab characters and spaces.
- In some cases, such as inserting a columnar block at the end of text lines, these extra padded spaces become trailing spaces. These extra spaces are trimmed by default, but this can be changed with CONFIG > Tab / Fill > Trim spaces after columnar operation.
This trimming and tab/space conversion applies only to the inserted text and adjacent spaces. It does NOT affect the entire file and only applies when working with columnar blocks.
Columnar Block Examples
To perform columnar block operations mark the desired block with BLOCK > Set column marker ( Alt-I or toolbar). After setting the first block marker, the highlighting shows precisely which characters are included in the block. You will immediately notice the difference in the way the text is highlighted in Column Mode.
When columnar markers are set, Cursor Right will move past the end of short lines (similar to cursor positioning mode “4”). This lets you set the right column past short lines.
The following screen shows a columnar block highlighted. Note that the cursor is in the lower right corner of the block:
EEEEEEEEEE
DDDDDDDDDD
IIIIIIIIII
TTTTTTTTTT
VVVVVVVVVV
EEEEEEEEEE
DDDDDDDDDD