问题:
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