OdeToCode IC Logo

Two Keys Are Better Then Three

Tuesday, January 24, 2006

Smart tags appear in Visual Studio when the IDE thinks it can help you make quick work of a common task. I use the feature quite a bit, particularly for rename refactoring, implementing interfaces, adding using declarations, and generating method stubs.

closed smart tag in Visual Studio 2005

One way to open a smart tag is to hover the mouse over a 1 pixel hotspot that lives somewhere in the vicinity of the smart tag indicator.

Fortunately, Visual Studio assigns the same keyboard shortcut to open a smart tag as Office apps: Shift+Alt+F10. The keyboard is a better approach, but Shift+Alt+F10 is one of those piano virtuoso maneuvers. Splay your fingers, point your wrists outward, and attack the keyboard with a flourish. Actually, it’s not a bad exercise to avoid carpal tunnel. On my laptop, I sometimes open the smart tag, I sometimes turn off the LCD.

open smart tag in Visual Studio 2005

When I went into the Customize menu to assign a new keyboard shortcut, I found there is already an alternate shortcut assigned: Ctrl+. (see Tools -> Customize -> Keyboard -> and show commands for View.ShowSmartTag).

Ctrl+. is a better shortcut to open a smart tag, but I’m still waiting for the day when I can blink at the screen and get a reaction.