Ctrl-c copy a piece of code (Ctrl-x is the same problem)
The cursor moves to the blank line position where you want to paste the code (typically pasted on a blank line)
Hold down the CTRL key, and when you are ready to press the V button, a distraction or a shake of the hand, the finger falls on the C key.
You come back to see, nothing is pasted out, just move the cursor down one line.
You think you did not press the key, and then several consecutive ctrl-v, see the cursor down one line, still nothing.
At this point, if you know Shift-ctrl-v (cycle Clipboard Ring) This shortcut, may not be how angry, press two shift-ctrl-v will be able to solve the problem, but if you do not know the shortcut, you will be very annoyed, can only be reproduced, if it is cut, Your irritation will double.
After copying a large chunk of the "clipboard with CTRL + C, I move the" cursor to "correct spot in another file a D paste it with Ctrl + V. Oh wait, except instead of CTRL + V my fingers hit Ctrl + C. Even though I didn ' t highlight any new text, the editor threw me entire careful in the Clipboard and garbage it W ith the current line, forcing me to go back to the other file which I might have from now. This is a EXTREME pain in the backside, something I can ' t turn off (the existing setting only claims to work on Blank Lin Es, and doesn ' t even get-right), and something that Visual C + + never used to do before visual Studio. NET or whatever You call this. Would I have to write a extension that stops the editor from mindlessly performing the copy hotkey in any text that isn ' t Even selected?
Microsoft has not ignored this feedback and provided solutions in VS2012 (found on StackOverflow):
It ' s not copying a empty block, it's copying the blank line. Can change this setting into Tools > Options > Text Editor > All Languages > ' Apply/Copy Commands to Blank lines when there is no selection '.
The workaround is simple, just cancel the option of ' Apply cut or Copy Commands to blank lines when there is no selection '.
Although it is not possible to understand why there is a need to replicate empty lines, if so, it is acceptable.
However, why the default setting is to copy empty lines, which is contrary to everyone's daily operating habits. In the editor I used, I didn't encounter an editor that would copy empty rows in addition to Visual Studio, even if it was a notepad from Windows. This really can't understand!