title: VIM: Finding and replacing first N occurrences of a word
body: <p>I am editing a file and i want to change only a specific word with another word, but only for first N occurrences. I tried multiple commands</p>
  
  <p><code>N :s/word/newword/</code></p>
  
  <p><code>:%s/word/newword/count</code></p>
  
  <p>And other commands that i could find on google. But none of them works.</p>
  
  <p>EDIT:: Vim commands is preferred. But Vim script can also be used. I don't have any prior experience in vim scripting.</p>