Smart Tag shortcut key

Ever notice that little red bar show up sometimes in while coding in Visual Studio 2005?  It shows up after making certain changes to code, such as renaming methods, fields, or types that need to be imported:

That little red bar (did you miss it?  Look closer!) brings up a helpful context menu that has some nice refactorings/editing commands.  Unfortunately, to get the menu to show up with your mouse, you have to bring the mouse down from above onto that little bar that’s about 10 pixels wide.

That’s extremely annoying, and I’ve often missed many times trying to hit that little bar.  Couple that with the fact I don’t like to use the mouse while coding, and it’s even more annoying.

Luckily, VS 2005 has a nice shortcut combination to bring that menu up: Ctrl+.  After that combo, the menu shows up:

Now you can just hit “Enter” and it performs the highlighted command.  For ReSharper users, “Ctrl+.” is to Visual Studio as ”Alt+Enter” is to ReSharper.  I’m probably the last person to know this shortcut, but it’s nice for the few times I prefer Microsoft’s helper menu over ReSharper’s.

About Jimmy Bogard

I'm a technical architect with Headspring in Austin, TX. I focus on DDD, distributed systems, and any other acronym-centric design/architecture/methodology. I created AutoMapper and am a co-author of the ASP.NET MVC in Action books.
This entry was posted in Tools. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • “…it’s nice for the few times I prefer Microsoft’s helper menu over ReSharper’s”

    Any particular instances come to mind?

    I can’t think of a single time that the MS menu trumps ReSharper’s menu.

  • I like their “rename” refactoring a little better, as it doesn’t bring up a dialog box. That’s probably about it…