I finally had time to improve my Visual Studio .NET keyboard shortcut summary macro. Instead of writing HTML to the console*, it now creates a HTML file in your user documents folder, and navigates the IDE to the created file:
The advantage of a macro, of course, is that it queries the IDE for the actual keyboard bindings. It can also be sorted and grouped however you like. Very handy for erstwhile keyboard ninjas! This macro is tested and working in both VS.NET 2003 and VS 2005. Note that the macro generates an appropriately named file in each case:
- My DocumentsVisual Studio .NET 2005 Keyboard Shortcuts.htm
- My DocumentsVisual Studio .NET 2003 Keyboard Shortcuts.htm
It's also smart enough not to re-render if the file already exists. If you want to force a re-render, delete the file.
Here's how to install and run this macro:
- go to Tools - Macros - IDE
- create a new Module named "KeyboardShortcuts" under "MyMacros"
- paste the above code into the module
- add a reference to the System.Data namespace*; make sure it builds with no errors
- close the macro IDE window
- go to Tools - Macros - Macro Explorer
- A new macro named "List" will be under "KeyboardShortcuts." Double-click it to run the macro
- the macro will take a moment to write the keyboard shortcuts to a HTML file, then open the HTML file in the IDE.
* in VS 2005, there are a few minor extra dependencies: you'll have to add a reference to System.Xml and also import EnvDTE80.