title: Search and Replace with incremented values in Vim
body: <p>Lets say I wrote a simple CSS rule like this:</p>
  
  <pre><code>.star_10 {
    background: url(stars.png) no-repeat 0 0;
  }
  </code></pre>
  
  <p>And I need 10, so I copied it 9 times.</p>
  
  <pre><code>.star_10 {
    background: url(stars.png) no-repeat 0 0;
  }
  .star_10 {
    background: url(stars.png) no-repeat 0 0;
  }
  .star_10 {
    background: url(stars.png) no-repeat 0 0;
  }
  .star_10 {
    background: url(stars.png) no-repeat 0 0;
  }
  .star_10 {
    background: url(stars.png) no-repeat 0 0;
  }
  </code></pre>
  
  <p>etc.</p>
  
  <p>Now I want to change the <strong>star_10</strong> and <strong>0 0</strong> with incremented values so it looks like this:</p>
  
  <pre><code>.star_10 {
    background: url(stars.png) no-repeat 0 0;
  }
  .star_9 {
    background: url(stars.png) no-repeat 0 -18px;
  }
  .star_8 {
    background: url(stars.png) no-repeat 0 -36px;
  }
  .star_7 {
    background: url(stars.png) no-repeat 0 -54px;
  }
  </code></pre>
  
  <p>and so on...</p>
  
  <p>So how can I search/replace every instance, do a calculation and write it?</p>