Pragmatic Programmer tip 22

Use a single editor well

Taking this tip seriously this year. I am reading Inside Microsoft Visual Studio .Net 2003 in order to really be a power user of Visual Studio. One of my goals is to use the mouse less. So I downloaded the KeyMap addin this week. The KeyMap addin is an addin that shows all of the commands and their short cut key bindings in an easy to read table (see figure 1)


figure 1
 
In order to get it working I had to do the following (it was written for VS.Net 2002):
  1. Open the project up in VS.Net C++
  2. In the AddIn.rgs file, change Line 35 to read like figure 2 below for VS.Net 2003
  3.    33             NoRemove VisualStudio

       34             {

       35                 NoRemove 7.1

       36                 {

       37                     NoRemove AddIns

    figure 2

  4. It is written to show up on the Help menu, but I didn't have any luck with that, so I changed it to show up on the tools menu by editting Line 43 in Connect.cpp to look like figure 3
  5.    41             //Add a button to the tools menu bar.

       42             IfFailGoCheck(m_pDTE->get_CommandBars(&pCommandBars), pCommandBars);

       43             IfFailGoCheck(pCommandBars->get_Item(CComVariant(L"Tools"), &pMenuBarCommandBar), pMenuBarCommandBar);

       44             IfFailGoCheck(pCreatedCommand->AddControl(pMenuBarCommandBar, 1, &pCommandBarControl), pCommandBarControl);

    figure 3

  6. Build the project
  7. Restart VS.Net

Now comes the hard part ... fighting the habit of using the mouse...

posted on Saturday, January 29, 2005 4:35 PM

Feedback

# re: Pragmatic Programmer tip 22

You should try the KeyMap addin from the VS2003 Automation Samples, instead of the VS2002 Automation Samples webpage from which you downloaded. The VS2003 Automation Samples are located at: http://www.microsoft.com/downloads/details.aspx?FamilyID=3ff9c915-30e5-430e-95b3-621dccd25150&DisplayLang=en

You might have better luck with it, although I don't know if KeyMap was changed since the VS2002 samples. One difference between the 2002 and 2003 samples is that there's a single download file (mid-way down the webpage) that contains all the samples, instead of having to download 2 dozen different files... I just re-downloaded it and it hasn't changed since it was initially released back in 12/2003.
1/29/2005 4:01 PM | Steve Hall

# re: Pragmatic Programmer tip 22

Steve:

Thanks for the link! I hadn't found the page for the VS.Net 2003.
1/29/2005 11:21 PM | Jason Haley

Post Comment

Title  
Name  
Url
Comment   
Please enter the following code into the box below to stop spammers

  
Enter Code Here *