In vim, how do I paste a column of text to the end of irregular length lines?

后端 未结 5 1163
悲哀的现实
悲哀的现实 2020-12-30 00:39

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         


        
5条回答
  •  太阳男子
    2020-12-30 01:28

    You could try to do the following four steps:

    1. block-wise select the first 3 lines (you want to paste later), and press y
    2. line-wise select (V) the 3 lines ending with _, press :right
    3. then move cursor to the end of the first line($), paste the yanked text
    4. gv re-select the lines, press :left

    It looks like this:

    enter image description here

提交回复
热议问题