Vim paste weird indentation
Vim pasting without the weird indentation
๐ Issue
I wanted to paste the code from clipboard using vim, but when the code got longer, the formatting became super weird with a lot of tabs.
๐ Solution
It was actually really simple.
Before typing i
to enter the insert mode, type :set paste
.
If you go to insert mode after doing so, youโll be seeing --INSERT (paste)--
. In this mode, pasing works the way you want it to!