How to delete (not cut) in Vim?

前端 未结 6 520
别那么骄傲
别那么骄傲 2021-01-29 17:52

How can I delete a line without putting it into my default buffer?

Example:

line that will be copied.

line that I want to be substitued with the previou         


        
6条回答
  •  醉酒成梦
    2021-01-29 18:41

    You can use "_d to prevent things from overwriting your yanked text. You can store yanked or deleted text in whatever register you want with ", and _ is the 'black hole' register, where you send stuff that you don't care about.

    For more information you can type :help "_ or :help deleting

提交回复
热议问题