How does one set Visual Studio 2010 keyboard shortcuts comfortably, especially when using ReSharper?

北慕城南 提交于 2019-12-01 06:24:03

问题


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


回答1:


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



回答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".



来源:https://stackoverflow.com/questions/3725007/how-does-one-set-visual-studio-2010-keyboard-shortcuts-comfortably-especially-w

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!