Cut and paste multiple lines in vim

前端 未结 5 1327
旧时难觅i
旧时难觅i 2021-01-30 03:03

I\'m running vim 7.3 on a Mac 10.7.2 and I\'m having some trouble cutting and pasting several lines.

On my old Linux setup (which was stolen so I don\'t know versions)

5条回答
  •  深忆病人
    2021-01-30 03:37

    Not sure if this is close enough to what you're trying, but one thing you could do is use a specific register, and capitalize your register name. That tells vim to append to the register rather than replace it, so if you have the lines:

    one
    two
    three
    

    you can enter

    "qdd
    "Qdd
    "Qdd
    

    and then subsequently if you enter

    "qp
    

    it will paste back the original lines

提交回复
热议问题