title: incrementing multiple IP addresses in VIM
body: <p>I would like to edit my hosts file to match my current IPs, I could do it in Python or AWK, but I was wondering if there is a way in VIM...</p>
  
  <p>let's see what I mean, my hosts looks like that:</p>
  
  <pre><code>192.168.11.172    blazer blazer.mydomain
  192.168.11.173    faster faster.mydomain
  ...
  192.168.11.225    schurtig schurtig.mydomain
  </code></pre>
  
  <p>Now, I want to increment every IP by 32 so the end result would be:</p>
  
  <pre><code>192.168.11.202    blazer blazer.mydomain
  192.168.11.203    faster faster.mydomain
  ...
  192.168.11.257    schurtig schurtig.mydomain
  </code></pre>
  
  <p>If I put my cursor on the right IP, and type</p>
  
  <blockquote>
    <p>30 and CTRL+A</p>
  </blockquote>
  
  <p>it does what I want.  </p>
  
  <p>The only problem, I have about 300 hosts ... and I need to do it once every 3 months ...
  Although I could do it in Python, seeing the file in vim <strong>feels</strong> safer, because I don't need to run a script and then control the result after that. </p>
  
  <p>The following changes only the first line:</p>
  
  <pre><code>let i=172 | g/172/s//\=i+30/
  </code></pre>
  
  <p>I want to repeat this in a loop for different IP ranges being able to say how many times i should be incremented, is there a "trick" that does that?</p>
  
  <p>Thanks in advance for the efforts, 
  Oz</p>