How to add incremental number between every few lines in VIM

  Kiến thức lập trình

I have a text file

a, b
c, d
e, f
g, h
i, j
etc

I need the following file using VIM at every N line. Here, I use N=2

a, b
c, d
1
e, f
g, h
2
i, j
etc

Is there any way in VIM?

LEAVE A COMMENT