I recently upgraded to Visual Studio 2010 and found out that when I press Ctrl + Backspace on an empty line it will delete the line, which is what it did in 2008, but then it will开发者_如何转开发 also delete the last character on the line above. I have tried to see if there is any settings anywhere but i cant seem to find any. Does anyone know if you can change this or did they make it default in 2010
Im using C#, if that makes a difference.
Update: Visual Studio 2010 SP1 contains the real fix that I mentioned below (see the "Visual Studio Editor" section of this document). Once you've updated, you should uninstall the extension, though it probably won't cause issues if it is left around.
Do you have the caret in virtual space (e.g. after hitting enter from a previous line, and the caret is aligned at the correct indent level)?
If so, this is a bug in the RTM. I've already fixed it in our internal builds, though that's probably not very helpful for you. I went ahead and wrote a small extension that "fixes" the issue, which you can download here. If you are curious, you can also take a look at the workaround in FixCtrlBackspace.cs. It's essentially just overriding the behavior of Ctrl + Backspace, when the caret is in virtual space, to clear the virtual space.
Let me know if that helps, or if it breaks anything (I didn't test it very heavily).
Ctrl + Backspace deletes the word to the left of the cursor. If you are on a blank line and hit it twice it will delete that line and the word above it.
精彩评论