When i'm in Insert mode at vim, and press Shift+Insert to paste my code to my file, vim disassembles my indentation , Such as:

Question: How can i solve this problem?
When i'm in Insert mode at vim, and press Shift+Insert to paste my code to my file, vim disassembles my indentation , Such as:

Question: How can i solve this problem?
Vim is acting as if you had typed all of your pasted code by hand, so Vim will add additional indentation and otherwise change whitespace as it normally would, such as with your autoindent setting. To paste code in Vim:
:set paste to enable paste mode.:set nopaste to disable paste mode so your normal typing will work as expected again.And see :help paste for more information, including which options are disabled/altered when paste mode is on.
It's possible to set up mappings for this sort of thing if you do it a lot. See :help imap for more information on that.