Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is VIM's copy and paste broken and how to get it right? [duplicate]

Tags:

vim

One thing I haven't figured out is how to get vim's copy and paste to work correctly.

Can someone explain why it doesn't out of the box and how to get it to work that preserves the spacing etc?

e.g. if I copy and paste a block of code from a browser, it should paste into vim with the spacing in tact.

like image 684
loyalflow Avatar asked Jan 28 '14 15:01

loyalflow


1 Answers

Turn on paste mode with :set paste to stop vim applying any indentation to the pasted text.

like image 111
desbo Avatar answered Nov 14 '22 20:11

desbo