I'm using Vim in the zsh shell on OSX.

In the image you can see that I have created a test text on the left side. When I exit insert mode (using Esc), Vim duplicates my text a few times.
You can see my Vim editor when I exited the insert mode on the right side of the image.
Why does Vim do that and how can I prevent it?
Make sure you don't accidentally type a number before entering insert mode.
Like any other action, entering text in insert mode can be repeated by prepending the command with typing a number.
For example, typing 3ihelloEsc from normal mode results in the text hellohellohello entered.
If you're unsure whether you have already typed a number, you can cancel any repetition by typing Esc again before entering insert mode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With