Archive for January, 2008

How to stop auto indenting in VIM when pasting

Finally I spent the time to figure out how to paste in VIM without it adding so much extra indenting that pasted text isn’t even readable.

All you have to do is tell VIM that you are pasting and it will suspend auto indenting. Do so by:

:set paste

When done, tell VIM and it will resume it’s normal indenting while you type:

:set nopaste

Gone is all the time deleting the extra indents from my pasting. :)