Visual Studio 2010 Keyboard Shortcut Chords - visual-studio-2010

I started out with VB6 default shortcuts where Ctrl + R brings up the Solution Explorer window.
Now when I hit Ctrl + R I see a status message saying that VS is waiting for me to hit the next sequence in the chord, suggesting to me that I have shortcuts that begin with Ctrl + R but require another keystroke.
This suggests to me that having one or more shortcut sequences that begin with Ctrl + Rinvalidates the Ctrl + R shortcut, which I can understand, but the question is, how do I find what those command are so I can assign a different sequence to them?
Also, shouldn't VS warn me when assigning the first chord shorcut that begins with Ctrl + R that this will invalidate my Ctrl + R shortcut or, it should clear it out so Ctrl + R is no longer a shortcut for the Solution Explorer window.
Anyway, I guess the question is how do I locate the commands that begin with Ctrl + R so I can change them so they dont collide with my Solution Explorer shortcut Ctrl + R?

In VS 2010, Tools | Options | Environment | Keyboard gets you to the right place. Now, put the cursor in Press shortcut keys, and press the keys you are interested in (so Ctrl + R). The Shortcut currently used by dropdown will then show you all the shortcuts that currently involve the keys you have pressed.
I agree it would be a 'nice to have' for VS to warn about overlapping shortcuts, but note that different shortcuts can have different scopes of effect (in the Use new shortcut in dropdown), so this might not be as easy as it sounds.

The keybindings poster from MSDN might be helpful. It looks Ctrl + R behaves differently depending on if you are debugging or not.

Have a look at IntelliCommand Plugin. This helped me out a lot in learning and remembering the chrod combinations.
Also Learn the shortcut Plugin is pretty cool too.

Related

Can't collapse pieces of code after doing Ctrl + M, P

Ctrl + M, P expands the whole document. But after doing this I can't collapse back specific methods or pieces of code. It's not possible via shortcut keys (for example: Ctrl + M, M) neither via the menu:
As you can see, only Ctrl + M, O is possible which collapses the whole document
Also the + en - signs disappear when I do Ctrl + M, P
In VS2012 toggling outline expansion is [CTRL] + M, M. I presume this hasn't changed from previous version. Don't have VS2010 to check...
Old question, and some of this is in the comments, but I'll tie it all together in an official answer since I recently did the same thing accidentally in Visual Studio 2015 and it took me a while to figure out what I had done.
The CTRL+M, CTRL+P combination turns off outlining for the current document. It is possible to turn it back on by closing and re-opening the document as long as the "Enter outlining mode when files open" option is checked under Tools|Options|Text Editor|C#|Advanced. (there are similar options for other editor types - you can search on "outline" in the options dialog to see them all).
If you find yourself doing this often, there is a command to turn outlining back on, however, it is not assigned a keyboard shortcut by default. You can assign one though.
Open the Tools|Options|Environment|Keyboard dialog.
Enter "outli" under "Show commands containing" and look through the list below for the one named "Edit.StartAutomaticOutlining".
When you click on it, it will either show you what keys are currently assigned if a shortcut is already assigned, or will indicate nothing is assigned.
If there isn't anything listed, select "Editor" from "Use new shortcut in", then in the "Press shortcut keys" box, press the key combination you want to assign it to. For example, I used CTRL+M, CTRL+[.
Now if you accidentally hit CTRL-M, CTRL-P and turn off outlining, you can quickly re-enable outlining with CTRL-M, CTRL-[.

What is the keyboard shortcut for Code Rush three periods?

I know with ReSharper you can use the keyboard shortcut Alt + Enter to open the "quick tasks" or whatever it's called. Is there a similar keyboard shortcut for Code Rush?
Officially the answer is Ctrl + ` (Ctrl and back tick)
However in some scenarios this can set itself up as Ctrl + ' (Ctrl and single quote)
Note: I believe the reason for this comes down to codepages\keyboard layouts and other things I don't fully understand :)
The common shortcut to invoke code refactorings and fixes in CodeRush is the Ctrl + ` (backtick) key combination. This shortcut invokes the popup menu which lists all operations available for the current context.
It's configurable. Mark Miller recommends setting it to NumPad 0 so your pinky can hit it as needed - careful though - you'll get addicted!

Windows 7 Map CTRL + j to the Down Arrow Key

I have been searching for months for a way to map a key combination (CTRL + something) to a directional key (like down or up).
I desperately want in Visual Studio to be able to press CTRL + j and have the cursor move down a line. I hate having to move my hands off of the home row to move up and down for things like intellisense or even just navigating up and down lines.
Does anyone have a solution for this? I would be ok with a Visual Studio-only solution, but something that works at the OS level would be ideal since this kind of navigation would be nice in any editor window and for instance SQL Server Management Studio also has intellisense.
I haven't considered any macro hotkey type solutions since they could conflict with in-app hotkeys (for instance if CTRL+j were assigned to something in Visual Studio already)
I think the answer is nothing out there exists that would do this. I have done a lot of research.
I am now using Autohotkey instead of what would have been ideal. I have been familiar with this application for years and it does a pretty good job, but doesn't work across remote desktop for instance and so doesn't quite fill the need.
I mapped ctrl + i to do up, ctrl + k to be down, ctrl + j as left and ctrl + l for right.
VS-only solution is simple.
At least in Visual Studio 2017 you can assign Ctrl+XXX key combinations to corresponding commands for Text Editor.
CharLeft
CharLeftExtend
CharRight
CharRightExtend
LineUp
LineUpExtend
LineDown
LineDownExtend
PageUp
PageUpExtend
PageDown
PageDownExtend
LineStart
LineStartExtend
Delete
DeleteBackwards
WordPrevious
WordPreviousExtend
WordNext
WordNextExtend
and so on.
All using standard Tools / Options / Environment / Keyboard settings dialog.

Keyboard shortcut for Visual Studio/Resharper tooltips?

Is there a keyboard shortcut to display tooltips provided by Visual Studio & Resharper when you hover over a bit of code? I'm already aware of Quick Documentation (Ctrl + Q) and Quick Watch (Ctrl + Alt + Q).
Do you mean Ctrl + K, Ctrl + I? This is the command Edit.Quickinfo.
(sorry, I am unable to add a comment with the PC I have now)
For the single variable, do you mean in debug mode ?
2nd Edit: I think VS names these tooltips 'datatips'. Unfortunately, there is no command to show them, so no possible shortcut.
You can do it by binding this command to a key:
EditorContextMenus.CodeWindow.PinToSource
Unfortunately it works with what you have selected, not with what you are hovering over. Not only do you have to do the extra click, but you need to select the entire variable name and all of its prefixes as well.
Old question but useful to know.
My shortcuts:
PinToSource set to alt-F1
ClearAllDataTips set to shift-alt-F1
CTRL+ALT+Q
It is equivalent to
SHIFT+F9

Visual Studio 2008 - jump to line number shortcut

I can go to a specific line number by double clicking in the status bar in Visual Studio. Is there a keyboard shortcut that does the same thing?
Ctrl + G
Check out all the keyboard shortcuts at:
http://www.microsoft.com/downloads/details.aspx?familyid=e5f902a8-5bb5-4cc6-907e-472809749973&displaylang=en
Ctrl + G works for me.
If it doesn't work for you, you can always map whatever shortcut you want under Tools | Options | Environment | Keyboard.
EDIT: Yes, as #Brian mentions, the command in this case is Edit.GoTo
I just realised that the default in C# settings for this command is Ctrl + G, whereas in VB Settings, there is no default keyboard short - it's mapped to show the immediate window - strange I think. I swapped the mappings so that the two environment behave the same.
Every IDE or even text editor I have ever used either uses Ctrl + L or Ctrl + G for this purpose.
I assume this could stand for Ctrl + Line or Ctrl + Goto
Yep Ctrl + G.
From this answer you can get a nice Shortcut poster.

Resources