I used to have a macro that would return the cursor to its previous position the moment I hit the . (repeat command)
This was pretty useful, since I use . a lot.
Basically, I want . to do exactly what it does now — but without changing the cursor position.
I know it’s possible, but I’ve forgotten how to do it.
One way to accomplish this is to use marks:
nnoremap . ma.`aWhat this does:
ma.`a.It will overwrite whatever position was previously marked with
a, but you can replaceawith whatever letter you want.