views:

34

answers:

3

In every Visual Studio.NET version you can set keyboard shortcuts using "Tools - Options - Environment - Keyboard" and then find the command you want to assign a shortcut to by entering part of it in "Show commands containing".

For one thing, the listbox is ridiculously short and hard to navigate - does anyone know an alternative?

Then, how do I find out the correct command name for a specific action?

Specifically, I'm using R# 5.1 with VS.NET 2010 and want to have the ALT+ENTER shortcut back (it used to be there in older versions by default) that opens the R# context menu when the cursor is over a curly underline R# uses to highlight errors or warnings.

How do I find out the command name for that (except by an educated guess)?

I couldn't figure it out and appreciate any hint.

+1  A: 

You can rebind all of the ReSharper shortcuts by using the ReSharper -> Options -> Visual Studio Integration page. Select a keyboard scheme and hit "Apply Scheme".

Roger Lipscombe
I know, but that doesn't help me to find a specific command, it just resets everything to one or the other default scheme.
Olaf
Yeah, I know, but that might have been your actual problem. The Alt+Enter shortcut in R# is called "Quick Fix". Might help you find it.
Roger Lipscombe
The "Quick Fix" hints solved my actual problem - thanks indeed!The other question, however, remains: how do you find out that this is called "Quick fix" (for example)?
Olaf
From that dialog, no idea. I found out in an email conversation with JetBrains a couple of years ago.
Roger Lipscombe
+1  A: 

The way I do this is to perform an action while recording a macro (using Tools / Macro / Record temporary macro).

When I have finished with the action, I look at the source code of the macro and it usually helps to find the correct command.

For example, I have just let R# add some magic through Alt-Enter, and the macro recorder has:

DTE.ExecuteCommand("ReSharper_QuickFix")
Timores
A: 

I can't speak for R# but having worked with commands in VS quite a bit now there are a couple of general rules that you can follow:

  1. The command is almost always related to the menu path. So if you are looking for the command to show Solution Explorer (View -> Solution Explorer on the menu) it is most likely going to start with "View."

  2. You can type partial names and they will show related commands. If I go to Tools -> Options -> Environment -> Keyboard and start typing in the "Show commands containing" area it will do partial searches. Typing "hide" (w/o the quotes) will show every command that has the word "hide" somewhere in it.

This blog post might help explain: http://blogs.msdn.com/b/zainnab/archive/2010/08/02/find-keyboard-shortcuts-vstiptool0061.aspx

zainnab
Thanks for this. Indeed, a lot of commands can be found using a hierarchy or are self-explanatory - but some are too cryptic, so Timores' answer was the way to go for me.
Olaf