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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章