I wanted to paste some HTML into Vim, and I was having a hard time getting something that preserved existing indentation.
After doing :help autoindent, I found out about smartindent. So, I turned both smartindent and autoindent off before doing my paste. That worked wonders!
1 :set nosmartindent 2 :set noautoindent 3 i 4 <CMD>-V 5 <ESC> 6 :set smartindent 7 :set autoindent
Voilà, a correctly pasted, non-indented version of whatever was in the clipboard!