Assume you need a numbered list:
1Write the following commands:
qaYp<ctrl a>q
- q - start recording
- a - write macros into register 'a'
- Y - yanks the line
- p - paste yanked on the line below
- <ctrl a> - increment value
- q - stop recording
Now you can write "10@a" to repeat macros from register 'a' 10 times.
The result will be the following:
1
2
3
4
5
6
7
8
9
11
12
Комментариев нет:
Отправка комментария