Many times in vim I would like to delete a line completely, so I use dd. However, I then need to paste that line into some other position within a line, but this inserts a newline before pasting, therefore, making it very difficult for me to get the desired result. For example,
while( pasteInHere )
{
cin >> n; // Delete this line completely with dd
}
when I do this with the above code I get:
while( pasteInHere )
cin >> n; // Delete this line completely with dd
{
}
which is very far from the result I want...how can I suppress this newline behaviour, or use another method that does it very efficiently? I don't think d$ is good because I not only have to go to beginning of line, but if I want to delete the empty line too I need to delete it in another register, I feel like there should be an easier way! Thanks.

0Ddelete line except line break. And thangJto join lines. Now you can put the text without break line and no empty line. – Alex Kroll Jul 14 '15 at 22:02