logo
Published on

Vim paste weird indentation

Authors
  • avatar
    Name
    Jenny Kim
    Twitter

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!