問題:
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