Compartir a través de


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: VS2005Tip,VS2008Tip

Comments

  • Anonymous
    November 18, 2008
    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 ;)

  • Anonymous
    November 18, 2008
    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).)

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

  • Anonymous
    November 19, 2008
    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).

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

  • Anonymous
    November 25, 2008
    The comment has been removed

  • Anonymous
    January 02, 2009
    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!

  • Anonymous
    June 05, 2009
    Tip #0 Know your Keybindings! General Development Settings Searching Tips Tip #1 How to behold the power