At least once a day I have the following situation:
A: This line should also replace line X ... X: This is line should be replaced
I believe that I am not performing this task effectively.
What am I doing:
- Go to line A: AG
- Yank line A: yy
- Go to line X: XG
- Insert row A: P
- Go to old line: j
- Delete old line: dd
This has the additional drawback that line X is now in the default case, which is annoying if I find another line that should be replaced by A. Janking and pasting from the extra case ( "ayy , " aP ) makes this simple task even less efficient .
My questions:
- Did I skip the Vim built-in command to replace the line twitching before?
- If not, how can I bind my own command that leaves (or restores) the yanked string in the default register?
vim
crispy Dec 26 '10 at 10:44 2010-12-26 10:44
source share