How to delete (not cut) in Vim?

前端 未结 6 521
别那么骄傲
别那么骄傲 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:42

    yy
    Vx
    p
    

    When in visual mode, x will delete the selection, so if you want to delete a whole line, first press V to select the line in visual mode and then press x to delete the selection.

提交回复
热议问题