Paste into VIm without screwing up formatting

Often pasting text into vim from an external source screws up the formatting (especially tabs). To prevent this, do:
:set paste

Keeping this setting on screws up auto indentation while in insert mode, though. So to turn off, use
:set nopaste

Wednesday, August 5th, 2009, 6:10 pm

|

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>