You can accomplish exactly what you want with macros, in a nutshell:
- In normal mode, press 'q' and a random letter, lets say 'f': This will start recording a macro in the register 'f'.
- Perform the actions you want to repeat: In this case ']c' and 'do'.
- Stop recording the macro: Just press 'q' again.
Now you can use it by typing '@f' in normal mode and it will replay the actions recorded in the macro 'f'. From there you have several options:
- If you type '@@' vim will replay the last macro. Hint: if you just keep the combination pressed in the keyboard it will do it line by line very fast.
- If you type '1000@f' vim will replay the last macro 1000 times, which is pretty much what you are looking for.
- If you want to save some typing, you can record a new macro i.e. 'g' performing '1000@f', that way '@g' will call '1000@f', although if you use '@@' after '@g' it will do it line by line.
There is a nice tutorial here: http://www.thegeekstuff.com/2009/01/vi-and-vim-macro-tutorial-how-to-record-and-play/