3

In every Visual Studio.NET version you can set keyboard shortcuts using menu 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 - is there an alternative?

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

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

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

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Olaf
  • 10,049
  • 8
  • 38
  • 54

2 Answers2

4

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
  • 14,439
  • 3
  • 46
  • 46
2

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
  • 89,048
  • 55
  • 235
  • 380
  • 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 Sep 16 '10 at 09:22
  • 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 Sep 16 '10 at 10:03
  • 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 Sep 16 '10 at 10:38
  • From that dialog, no idea. I found out in an email conversation with JetBrains a couple of years ago. – Roger Lipscombe Sep 16 '10 at 10:52