Home Explore Blog CI



neovim

6th chunk of `runtime/doc/usr_25.txt`
b97add8088ca90c8abe9aedc0f88e9da30d2af5435e155610000000100000906
 program	   |
	|for a bank.  They wanted to	   |
	|send out a special,		   |
	|personalized letter.		   |
	|				   |
	|To their richest 1000		   |
	|customers.  Unfortunately for	   |
	|the programmer,		   |
	+----------------------------------+
<
You end up with two lines:
>
	+----------------------------------+
	|A letter generation program for a |
	|bank.	They wanted to send out a s|
	|pecial, personalized letter.	   |
	|To their richest 1000 customers.  |
	|Unfortunately for the programmer, |
	+----------------------------------+
<
Note that this doesn't work when the separating line is blank but not empty;
when it contains spaces and/or tabs.  This command does work with blank lines:
>
	:g/\S/,/^\s*$/join

This still requires a blank or empty line at the end of the file for the last
paragraph to be joined.

==============================================================================
*25.5*	Editing tables

Suppose you are editing a table with four columns:

	nice table	  test 1	test 2	    test 3 ~
	input A		  0.534 ~
	input B		  0.913 ~

You need to enter numbers in the third column.  You could move to the second
line, use "A", enter a lot of spaces and type the text.
   For this kind of editing there is a special option: >

	set virtualedit=all

Now you can move the cursor to positions where there isn't any text.  This is
called "virtual space".  Editing a table is a lot easier this way.
   Move the cursor by searching for the header of the last column: >

	/test 3

Now press "j" and you are right where you can enter the value for "input A".
Typing "0.693" results in:

	nice table	  test 1     test 2	 test 3 ~
	input A		  0.534			 0.693 ~
	input B		  0.913 ~

Vim has automatically filled the gap in front of the new text for you.  Now,
to enter the next field in this column use "Bj".  "B" moves back to the start
of a white space separated word.  Then "j" moves to the place where the next
field can be entered.

	Note:
	You can move the cursor anywhere in the display, also beyond the end
	of a line.  But Vim will not insert spaces there, until you insert a
	character in that position.


COPYING A COLUMN

You want to add a column, which should be a copy of the third column and
placed before the "test 1" column.  Do this in seven steps:
1.  Move the cursor to the left

Title: Editing Tables with Virtual Spaces and Column Manipulation
Summary
This section explains how to edit tables in Vim using the 'virtualedit=all' option, which allows the cursor to move to positions without text (virtual space). It provides an example of adding numbers to a table column and using commands like "Bj" for efficient movement. Additionally, it starts describing a process to copy a column and insert it elsewhere in the table.