In vim, r is used to replace a single char with another, . is used to repeat last command. However, this two does not work together here.
For example, I have
If I use r to replace first # with ., it changes to
However, when I move to second line, use . command to repeat last command, I get
What I expect is
If I use . to repeat command in the third line, I get