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
N :s/word/newword/
Although a bit longer, you can do:
:call feedkeys("yyyq") | %s/word/newword/gc
to replace the first 3 occurrences and then stop.
You can change the amount of y's for more or less replacements. (Can also use n to skip some)
Explanation: this is feeding y keystrokes into the /c confirm option of the substitution command.