Smart Tags and Sane Keyboard Shortcuts

I constantly rename variables. It’s probably the single most frequent refactoring activity I do. And that’s why I love Visual Studio 2005’s built-in Smart Tags feature.

If you’re not familiar with smart tags, check out K. Scott Allen’s post; he has some nice screenshots illustrating how it works. Here’s a demo movie of it in action:

Smart tag rename demo movie

Unfortunately, as Scott points out, the smart tags are a pain to use via the keyboard. To maintain compatibility with Microsoft Office’s implementation of smart tags, they chose the same keyboard shortcut:

Shift + Alt + F10

Go ahead. Just try to type that. I double dog dare you. It’s the most psychotic keyboard shortcut ever.

If that’s the best keyboard shortcut they can come up, I’ll stick with mousing over the approximately 5 pixel drop-down trigger area of the smart tag. This is really unfortunate, because the keyboard shortcuts in Visual Studio are generally well thought-out and usable in my experience.

Luckily, I don’t have to suffer through this bad keyboard shortcut for a frequent activity. There’s an alternate shortcut defined:

Ctrl + .

But that’s still not very intuitive. I prefer to use...

Alt + Down

... which is an excellent physical map to the conceptual activity of “dropping down” a smart tag menu. You can easily set this new keyboard shortcut up via Options, Environment, Keyboard. Search for commands containing “ShowSmartTag:”

Then just map a new global shortcut. Way better!

In general, it’s safer to learn the default keyboard shortcuts for an environment– too much customization is a self-defeating exercise. But sometimes the defaults are poorly chosen and you have no alternative but to customize them. What default keyboard shortcuts are you obliged to change in your environment, and why?

Jeff Atwood

Written by Jeff Atwood

Indoor enthusiast. Co-founder of Stack Overflow, Discourse, and staygold.us. Disclaimer: I have no idea what I'm talking about. Let's be kind to each other. Find me https://infosec.exchange/@codinghorror

⏲️ Busy signing you up.

❗ Something's gone wrong. Please try again.

✅ Success! Check your inbox (and your spam folder, just in case).

Recent Posts

Helping one another at a Repair Cafe in Amsterdam

If we do not stop to help each other, what do we become?

Yesterday, I received this email as a response to You Can't Vibe Code Love. It's such a remarkable and powerful statement that I asked permission to share it here, in its entirety, with personal information redacted: Hey Jeff, Hope you and your family are doing well.

By Jeff Atwood ·
Comments
You Can't "Vibe Code" Love

You Can't "Vibe Code" Love

About a year ago, I was offered a presentation slot at the WeAreDevelopers World Congress in Berlin. I rarely take speaking engagements, especially international ones, but this one arrived at just the right time, the right place, and with the right person – I said yes, on the contingency that Ben

By Jeff Atwood ·
Comments
An interactive TWiT Series You're the hero of the story! Choose from 1,024 possible endings. OFF by ONE with Jeff Atwood Hosted by Leo Laporte "every choice changes everything!"

Every Choice Changes Everything: The Show

About 3 weeks ago, Leo Laporte and I recorded the first episode of what will be a new monthly show on the TWiT network. Naming things is hard, and we almost voted on the name, like we did for Stack Overflow, but we quickly landed on Off By One with

By Jeff Atwood ·
Comments
Thank You For Being a Friend

Thank You For Being a Friend

It's been one of those months, and by that, I mean one of the 663 months since I was born. This won't be a long post, because I only have two things to say. First, I'm really glad we re-ordered the GMI (Guaranteed

By Jeff Atwood ·
Comments
I’m feeling unlucky... 🎲   See All Posts