I would like to paste a column of text at the end of irregular-length lines.
For example, I would like to paste the following:
SRR447882.fastq.gz
SRR
My UnconditionalPaste plugin has (among others) gBp
/ gBP
mappings that paste register contents as a minimal fitting (not rectangular) block with a jagged right edge.
Here's another way to do it with a different feel to it:
set ve=all
to permit insert/paste at arbitrary columns past eol. Block-copy your source text, then at your first target line paste it with 100|P
(100
being any column number longer than your target lines), then :'[,']s, *\%100c,,
If you do p
instead of P
you'll get a space separator.
Step 1
- goto to the start of the SPP... lines, then start Visual mode linewise with V (capital V), press j two times to get the desired lines selected then press y.
Step 2
- goto the start of the TIL0... lines, then start Visual mode linewise with V (capital V), press j two times to get the desired lines selected then type...
:s;$;\=' ' . split(@")[line('.')-line("'<")];g`
and press Enter.
You can do it like this:
qq
, start recording the q
macro4k
, go up four linesd$
, delete till the end of line4j
, go back to the previous line$p
, paste the line at the end of the lineq
, stop recording the macrojVG
, go down one line and select the remaining lines:norm! @q
, apply the macro to the selectionIt does however leave space where the previous text was. @Kent one's is still easier.
You could try to do the following four steps:
y
V
) the 3 lines ending with _
, press :right
$
), paste the yanked textgv
re-select the lines, press :left
It looks like this: