DEV Community

David J Eddy
David J Eddy

Posted on


VIM paste as expected

Some time when pasting code around and eventually into VIM the formatting get really messed up; especially if the logic contains commented areas. VIM likes to indent until the end of time.

The quick fix is to set VIMs mode to PASTE, not INSERT. Using the :set paste often does the trick.

To toggle the mode you can set a hotkey like so :set pastetoggle=<F2>.

Latest comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git