Ctrl-Backspace Visual Studio 2010

别等时光非礼了梦想. 提交于 2019-12-06 23:59:06

问题


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.


回答1:


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).




回答2:


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.



来源:https://stackoverflow.com/questions/2767934/ctrl-backspace-visual-studio-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!