Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top