title: How to renumber lines using a vi command?
body: <p>I am trying to renumber the lines <code>2,$</code> in a file using vim a command, I know the command <code>cat -n</code> of nl, I can number the lines, but I didn't get the expected output:</p>
  <p>I tried this  <code>:2,$s/^\([^,]\)// | 2,$!cat -n</code></p>
  <p>input:</p>
  <pre><code>#,Name,Types,Total,HP,Attack,Weaknesses,Strength
  493,Arceus,Normal,720,120,120,Fighting,strong
  483,Dialga,Steel;Dragon,680,100,120,Fighting;Ground,strong
  250,Ho-oh,Fire;Flying,680,106,130,Electric;Water;Rock,strong
  .... moer 100 lines
  </code></pre>
  <p>expected output:</p>
  <pre><code>#,Name,Types,Total,HP,Attack,Weaknesses,Strength
  1,Arceus,Normal,720,120,120,Fighting,strong
  2,Dialga,Steel;Dragon,680,100,120,Fighting;Ground,strong
  3,Ho-oh,Fire;Flying,680,106,130,Electric;Water;Rock,strong
  ....
  </code></pre>