Suppose I have an open buffer containing the following text
1111111111
1 1
1 222222 1
1 2 2 1
1 2 33 2 1
1 2 33 2 1
1 2 33 2 1
1 2 2 1
1 222222 1
1 1
1111111111
I can visually select and yank the 2-rectangle with the command 3gg2l<Ctrl-V>8jey
Then, I can immediately reselect and paste the yanked text (not changing the
buffer) with gvp
.
However, it seems like as soon as I write to the @@
or @"
register (even if
I don't change the value), something changes, and pasting doesn't work right
anymore.
For example, doing
:let @@=@@
:normal! gvp
changes the buffer to
1111111111
1 1
1 222222
2 2
2 33 2
2 33 2
2 33 2
2 2
222222 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1111111111
inserting the contents of the register as new lines, rather than overlaying the visual selection.
What am I doing wrong?