Reputation: 30075
Hello i have recently started using vim editor ( actually the plugin for netbeans ) and i am having trouble with the pastebin.
What would happen is i would yunk something in, and then do some deletes with dd and so i lose my initial yunk content. So for me as a beginner with vim its very confusing that delete actually does cut.
How do you guys usually go about this. I guess you have to paste it immediately after you yunk it, but wanted to know if you have other tricks about this.
Upvotes: 2
Views: 681
Reputation: 20763
Since jumping around in the file is quite easy and fast, I tend to just cat and then paste directly. (Sorry for the boring answer)
Upvotes: 0
Reputation: 13238
What would happen is i would yunk something in, and then do some deletes with dd and so i lose my initial yunk content.
No, you don't. Your yunked text is in register "0
.
:help "0
for more info.
Upvotes: 3
Reputation: 59862
You can use named registers to yunk
"ayw
"byy
"cy$
etc.
Where 'a', 'b', 'c' are names of registers.
to paste use
"ap
"bP
"cp
Default register is '"' and the system register is '+' and '*'
You can use unnamed register (black hole) to delete - in this way you won't overwrite information in the default register ('"').
"_dd
"_dw
"_D
Upvotes: 7