I use Vim v7.4 on a Windows laptop. Recently, I copied my .vimrc from a Mac, only to find that every time I leave insert mode, a sequence of strange characters will appear:
These characters (right after the cursor) don't actually exist, and they always follow the current position of cursor whenever I switch back to normal mode.
I tried this with a blank .vimrc, and the issue didn't occur. However, my current .vimrc is pretty big, and I have no idea how to debug this.
Does anyone know how to solve this issue?

InsertLeaveautocmd, or at_*setting. Also see: How do I debug my vimrc file?. – Martin Tournoij Dec 24 '15 at 14:10t_EIsetting in your .vimrc, which causes a terminal escape sequence to be sent when leaving insert mode. – Rich Jan 15 '16 at 12:00