You should be able to accomplish it with this:
:59,$s/$/\r/
Вопрос
I want to add a line break in vim from line 59 to the end of file.
- 0021: Paralleism
- 0022: Mazimum Sum Sequence
- 0023: Circles Intersection
- 0024: Physical Experiments
to this
- 0021: Paralleism
- 0022: Mazimum Sum Sequence
- 0023: Circles Intersection
- 0024: Physical Experiments
I tried the following but it doesn't work.
:59,Gs/$/$\n/
How can I achieve this with vim substitute?
Решение
You should be able to accomplish it with this:
:59,$s/$/\r/
Другие советы
Another way to do this would be:
:59,$g/./norm o
Alternatively if you wanted to do this to all lines beginning with a - you could do:
:g/- /norm o
Time for global:
:59,$g/^/pu_
For more see:
:h :g
:h :pu
:h registers