如何舒适地设置Visual Studio 2010键盘快捷键,特别是在使用ReSharper时? [英] How does one set Visual Studio 2010 keyboard shortcuts comfortably, especially when using ReSharper?
问题描述
在每个Visual Studio.NET版本中,您都可以使用菜单工具-> 选项-> 环境-> 键盘,然后在显示包含的命令"中输入要为其分配快捷方式的命令.
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?
具体地说,我将ReSharper 5.1与 Visual Studio 2010 和想要具有 Alt + Enter 快捷键(默认情况下在较早的版本中位于该位置)可以在光标位于卷曲的下划线ReSharper上时打开ReSharper上下文菜单.用于突出显示错误或警告.
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)?
推荐答案
我这样做的方法是在记录宏的同时执行操作(使用工具/宏/记录临时宏).
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.
例如,我只是让R#通过Alt-Enter添加一些魔术,宏记录器具有:
For example, I have just let R# add some magic through Alt-Enter, and the macro recorder has:
DTE.ExecuteCommand("ReSharper_QuickFix")
这篇关于如何舒适地设置Visual Studio 2010键盘快捷键,特别是在使用ReSharper时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!