If we try to paste some code on vim it will auto-indent the code making a mess.
We can avoid that with the vim paste mode.
:set paste will start the paste mode and
:set nopaste will stop it.
But to make more easy I did a shortcut to toggle the paste mode:
nnoremap <leader>p :set invpaste paste?<CR>
With this when we press
<leader>p the paste mode will start so we can paste whatever we want and then we stop the paste mode with
I hope you guys enjoy the tip!