Ctrl-Backspace Visual Studio 2010 - 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.

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.

Related

"Find all" in Visual Studio 2010 is not working as expected

I have a problem with Visual Studio 2010 when I try to find all some phrase word.
You can see, I tried to find "header-logo", but Visual Studio couldn't find it having "header-logo" beside the finding box (aspx file), but Visual Studio doesn't display it.
The same with other type files. It just shows the matched phrase in the CSS file.
What is the reason?
"Find was stopped in progress"
Visual Studio "Find in Files" does not work
I solve it by hitting Ctrl + Break, but you have to do it just right: hold Ctrl, press Break, release Break, and release Ctrl.
You can also reboot. I know it seemed unlikely to help in this case, but before the problem and solution were as well understood, there were a lot of people rebooting to solve it...

Prevent Visual Studio to scroll to the end of file when pressing Ctrl A (select all)

It's basically in the title.
Whenever you "select all" in the Visual Studio code editor, the editor will scroll down to the bottom of the file. Is there a way to prevent this?
I'm using Visual Studio 2008 at the moment, but this applies to all versions.
No, you cannot change this behavior.
Microsoft has been aware of this since at least VS 2010, but either doesn't think it's a bug or doesn't think it's important enough to fix.
From their response to a 2010 bug report filed on the issue:
We unfortunately do not plan to change Ctrl+A's scrolling at this
time, so we're unfortunately resolving this issue as Won't Fix for VS
2010. However, it will remain in our database to be revisited for a future release of Visual Studio.
Source: Microsoft Connect
A quick Ctrl-Z-Ctrl-Y will get you back to where you were. If you tend to do a Ctrl-S Ctrl-A Ctrl-C a lot then just get used to this whole chain instead: Ctrl-SACZY. Or, create a macro: https://msdn.microsoft.com/en-us/library/a0003t62%28v=vs.90%29.aspx
I was struggling with this myself, but the "undo" suggestion gave me an idea and I feel kinda dumb for not thinking of it earlier. Visual Studio includes "Navigate Backwards" and "Navigate Forwards" buttons (CTRL-, and CTRL+, respectively). So after you finish selecting and copying, simple click the navigate backwards button or type CTRL- and voilĂ ! you're back where you were.
I know it doesn't stop the scroll to begin with, but at least it puts your cursor back exactly where you left it!

Change the text cursor/caret in Visual Studio 2010

I've accidentally changed the text cursor/caret in Visual Studio 2010 from the line to the one with the box that highlights the entire character and cannot find out how to change it back.
Can anyone tell me how?
Thanks!
Press the Insert Key
To clarify there are two modes when using the editor: Insert and Overwrite.
Insert -- the "normal" thin caret that inserts characters as you type.
Overwrite -- the "fat" caret that will overwrite any previous characters as you type.
These two act the same when at the end of your document and you are just typing but go in the middle of some text and use them then you will see the difference.
If you are using a laptop keyboard also
Shift+0
will solve your problem.
I stuggled finding the insert key on my Mac book air because i'm running visual studio under bootcamp however i got it right by pressing fn + enter which i understand is equivalent to insert key on mac.
I posted a functional valid answer for Visual Studio 2019, that is applicable to VS2010 as well, to your question in the fallowing stackoverflow post LINK
There is a windows 10 level solution and Visual Studio level solution, enjoy. :)

How do I make the Enter key on intellisense when typeing in VB react the same way as in C# in Visual Studio?

I'm using Visual Studio 2008 and I'm used to C# where when Intellisense pops up, I select what I want by hitting enter and it doesn't skip down to the next line. In VB when I hit the enter on intellisense, I jump to the next line. Does anyone know where the setting for this intellisense option might be?
Hitting the SPACEBAR or TAB key in VB does the same thing that ENTER does in C#.
I know that this doesn't really answer your question, but intellisense is designed to work so that you just push the "next" character to choose the highlighted item (such as open parenthesis, period, semi-colon, etc).
I was bothered by this behavior in VB as well. This will be fixed in the next version of Visual Studio with a new setting for enter-key behavior.
https://github.com/dotnet/roslyn/pull/11873
Corrected link: https://github.com/dotnet/roslyn/pull/11769

Keyword highlighting on selection in Visual Studio 2008

A little while ago I managed to get Visual Studio 2008 (C++) into a state where, if I would select a keyword (or any symbol for that matter), by either double clicking on it or highlighting it, all other instances of that symbol within the current file would become highlighted too.
This was a really useful feature.
Since then it's gone away, and I don't know how to get it back.
Please help.
#Sander - that'll be it. Thanks!
I think you've installed RockScroll. It also lights them up in the graphical scrollbar (its main feature)
I use MetalScroll, it's like RockScroll only better; it doesn't interfere with Resharper (a VS must-have) and you can set it up to only highlight if you hold down 'alt' when you double-click.
There is something called "WordLight" by Mikhail Nasyrov.
An add-in for Visual Studio 2008 that highlights all occurrences of a selected text.
It searches and highlights substrings that are currently selected in a text editor.
Can be found at below link
WordLight
https://marketplace.visualstudio.com/items?itemName=MikhailNasyrov.WordLight

Resources