8

I have the text

var1=a
var2=aaa
var3=aaaaaa

some text... "" ...
some text... "" ...
some text... "" ...

I want to paste the a-part of the top 3 lines into the quotes in the last 3 line. The result should look like this

some text... "a" ...
some text... "aaa" ...
some text... "aaaaaa" ...

Now using Vim block selection Ctrl+V, selecting block of a til the end of each line using $ and then pasting it into the first "" gives me the wrong result:

some text... "a     " ...
some text... "aaa   " ...
some text... "aaaaaa" ...

As you can see, vim aligns pasted text by adding extra spaces, that I don't need in my case.

Why Vim inserting those spaces and how can I paste my block without those extra spaces get added?

Boris Brodski
  • 671
  • 7
  • 19

1 Answers1

4

Unfortunately, that's the standard behaviour, as far as I know. As detailed in this answer, if you check the contents of your registers via :reg, you'll see the whitespaces between linebreaks and text.

fruglemonkey
  • 1,530
  • 13
  • 12