In the vimgolf challenge Words in parens, I use cw(ctrl-r")Esc to format "one" and then use w. to format the next two words, but the results are three copies of the text "(one)".
I use the :reg command to confirm the " unnamed register content equals "three", and I found another solution that formats the text correctly: use cw(ctrl-r ctrl-o")Esc to format "one", then use w. to format the next two.
But I'm still confused about the vim dot command in this case: why does the dot command not act the same as typing out the command again? There must be something I have missed about the vim dot command: I hope someone can give me an explanation about this case.
:help c_CTRL-R_CTRL-O? I think it explains the difference pretty well – Christian Brabandt Jan 04 '18 at 12:17:help i_CTRL-R_CTRL-O. I think this is a good question, because based on the content, I would thinki_CTRL-R_CTRL-Rshould work similar toi_CTRL-R_CTRL-O, but it does not. It is not easy to understand why. Based on the docs, it seems the only difference is autoindent. But onlyi_CTRL-R_CTRL-Oworks as expected with the dot repeat. – Karl Yngve Lervåg Jan 04 '18 at 13:54CTRL-RandCTRL-R CTRL-Oin the comments to my answer here. – Rich Jun 29 '20 at 08:34