This happens to me sometimes, and I haven't been able to figure out why. Lets say I start recording in vim (press q) then I finish and use the macros a few times. Then I do something else, like continue editing the file. Then I want to use the macros again, but this time something else happens, for example, the cursor moves one word backwards.
This has happened to me a few times. For example, today I start a macros (q 2), then I use it (@ 2) a few times. Then I type some text and try to use the macros again (@ 2), but this time the cursor gets moved one word backwards when the macros was supposed to format some text into HTML.
Every time this happens to me I try to reproduce it. I create a dummy macros, then do the same thing again, but I've never been able to reproduce it at will. The macros just works when I try to reproduce this behavior.
I haven't closed or otherwise suspended vim in any of the times this has happened.
I know this question might be hard to respond with the information provided, but I hope this has happened to some of you before and you've been able to figure out why it happens. I'm pretty sure this is just something I don't know about vim.