Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ctrl-Backspace Visual Studio 2010

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.

like image 531
Chris Watts Avatar asked May 04 '10 18:05

Chris Watts


People also ask

How do I fix backspace in visual studio?

Hello everyone, in this post we will look at how to solve Cannot Backspace In Visual Studio in programming. Tools -> Options -> Environment -> Keyboard -> Reset.

What does Ctrl backspace do?

#2 Ctrl + Backspace Pressing Ctrl + Backspace will delete the last word you typed. In this way you can delete the last words, this is so much faster than pressing the backspace key multiple times.

How do I enable shortcut keys in visual studio?

On the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard. Optional: Filter the list of commands by entering all or part of the name of the command, without spaces, in the Show commands containing box. In the list, choose the command to which you want to assign a keyboard shortcut.

What is Ctrl KD in visual studio?

Ctrl + K + D (Entire document) Ctrl + K + F (Selection only) To find out which key bindings apply in YOUR copy of Visual Studio, look in the Edit > Advanced menu - the keys are displayed to the right of the menu items, so it's easy to discover what they are on your system.


1 Answers

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

like image 108
Noah Richards Avatar answered Nov 06 '22 07:11

Noah Richards