Any way to delete in vim without overwriting your last yank? [duplicate]

問題:

This question already has answers here : 這個問題已經在這裏有了答案
Closed 5 years ago . 5年前關閉。

I love vim, but one common gotcha is: 我愛vim,但是一個常見的陷阱是:

  • yank a line 拉線
  • go to where you would like to paste it 轉到您想要粘貼的位置
  • delete what's there 刪除那裏的東西
  • paste your yank, only to discover that it pastes what you just deleted 粘貼您的yank,只是發現它粘貼了您剛剛刪除的內容

Obviously the workflow is delete first, yank second. 顯然,工作流程是先刪除,然後再刪除。 But it would be reeeeeaaaaaalllly nice if I didn't have to. 但是,如果我不必這樣做,那將是reeeeeaaaaaalllly很好的。 Anyone have a trick for this? 有人爲此有把戲嗎? Does vim have a paste buffer that works well, or is there a .vimrc setting I can change? vim是否具有工作良好的粘貼緩衝區,或者我可以更改.vimrc設置嗎?


解決方案:

參考一: https://en.stackoom.com/question/FGYA
參考二: https://stackoom.com/question/FGYA
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章