Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's Weblog

My adventures embracing open source on CodePlex and at Microsoft

News

    • Did you know... All author proceeds go directly to sending Hurricane Katrina survivors to college.

      Microsoft Visual Studio Tips book

      Recent Entries

Did you know… Ctrl+. shows a smart tag - #359

We’ve all seen smart tags before, the little line that appears whether we’re renaming something or VS wants to help us add a using statement to our code.

C# smart tag example

There are two keyboard shortcuts to invoke (show) smart tags in the editor. There’s the keyboard shortcut no one can seem to remember Alt+Shift+F10, required for consistency with Office’s smart tags. Then there’s the slightly easier to remember keyboard shortcut Ctrl+. (period)

In C# it’s cool that you can just press Ctrl+. then press Enter, and the smart tag does its job. But in VB, you have to press Ctrl+. then arrow down (to select the first item) then press Enter. Sigh, yet another accessibility bug…

VB smart tag example

The command is View.ShowSmartTag if you want to rebind to something else. the Blogosphere seems to like Alt+Down Arrow, which isn’t bound to anything in the Editor scope.

View.ShowSmartTag command

Technorati Tags: ,
Posted: Tuesday, November 18, 2008 3:00 AM by saraford

Comments

Ricardo Villamil said:

I personally love this shortcut and use it all the time! I use the Alt+Shift+F10 one, didn't know about Ctrl + ., I think I'll try to switch to it now ;)

# November 18, 2008 2:48 PM

Kelly said:

Thank you! I have been having a horrible time getting the little bar to respond to my mouse so that I can see the dropdown. Now, I know how to do it with the keyboard. Works every time without fail! (so far).)

# November 18, 2008 4:33 PM

Danny Trobu said:

Great Tip! Great to know I'm not the only one who cannot remember alt-shift-F10. Yay for Ctrl+.! Thanks Sara!

# November 19, 2008 8:32 AM

Serge Wautier said:

Great! I read about it a couple of times but never managed to make it work. Thanks to your screenshots, I can now use it.

FWIW, Ctrl+. is actually Ctrl+; on my belgian french keyboard.

Pretty cool that VS realizes that . requires Shift on my keyboard (as opposed to ;. Which I believe is one of the differences with US keyboards) hence binds the function to Ctrl+;

(OTOH, I guess this the reason I never managed to make it work before).

# November 19, 2008 12:29 PM

Programmerman said:

Yeah, I'm one of those who uses Alt+Shift+F10. I do love this keyboard shortcut. :)

# November 20, 2008 11:40 AM

Keenan Marshall said:

Neither shortcut does anything for me, and they're mapped just fine.  I don't even see that smart tag line.  Is there something I need to enable?

# November 25, 2008 4:15 PM

Matthias said:

Yeah... thanks to the information here I was able to re-bind it to Ctrl+1 so that I can keep using it the same way in Eclipse and in VS! Thanks a lot!

# January 3, 2009 4:58 AM

Sara Ford's Weblog said:

Tip #0 Know your Keybindings! General Development Settings Searching Tips Tip #1 How to behold the power

# June 5, 2009 4:25 PM
New Comments to this post are disabled
Page view tracker