I'm not really sure how to describe what I'd like to do. Basically I'd like to use visual block mode to select a region of text and then paste it "as a collection of lines" rather than as a rectangle.
a b
c d
e f
g h
after pressing gg0<c-v>Gy
the rectangle a/c/e/g
is in the default yank register (I forgot what it's called).
If I then paste the rectangle p
I get the following:
aa b
cc d
ee f
gg h
I'm wondering if it's possible to paste a rectangle / visual block selection on a group of lines by itself, as if it were an ordinary visual selection.
a
c
e
g
a b
c d
e f
g h
:call setreg('+', @+, 'V')
. Depending on your OS and your setting ofclipboard
, you might need to do this for registers*
or"
instead. It's longer to type than the answer below, but it might still come in handy in more complicated contexts.