Function Description: Inserting consecutive numeric columns in vim
Like what
1,
2,
3,
4,
5,
...
100,
Command: Use the Q command to record your own action sequence and then repeat the preparation:
First enter the starting number, for example enter 1 and comma, the cursor in the current line
The action sequence is as follows:
1. In normal mode, QA will put the action record into register A, can use the register according to their preference
2. Y copy entire row
3. Paste to the next line
4. F, find the comma to the right,
5. h cursor moves one character to the right
6. Ctrl + A value plus 1
7. Q Exit Record
Generated:
Depending on the number of rows to insert, such as inserting 100 rows here
Enter [email protected] in normal mode
Done!
As for complex builds, it is basically possible to combine your own requirements with the Q command.
Note: The 5th step is to have the cursor always in the single digit of the numeric value.
VIM generates consecutive numeric columns