How do I paste a column of text after a different column of text in Vim?

后端 未结 6 973
小蘑菇
小蘑菇 2020-12-07 11:22

I have two columns full of text, and I want to get them side-by-side. For example, I have

abc
def
ghi

and

123
456
789
         


        
6条回答
  •  鱼传尺愫
    2020-12-07 11:32

    If you'd like to manually set the register type to say blockwise, use this

    :call setreg(0, getreg(0), 'b')
    

    or

    :call setreg('*', getreg('*'), 'b')
    

    Useful for pasting a column from a spreadsheet editor.

    See :help setreg and vimtip for details.

提交回复
热议问题