title: Vim text substitution - next n lines (not rest of file)
body: <p>I often want to squash git commits using vim (using rebase). I have a very nice shortcut for squashing all commits from the cursor to the end of file:</p>
  
  <pre><code>map s :,$s/^pick/squash/&lt;CR&gt;
  </code></pre>
  
  <p>But often don't want to apply this substitution to all remaining lines in the file, but to the next n lines. Is there a way to modify this command to only apply it to the next n lines?</p>