Welcome to EMC Consulting Blogs Sign in | Join | Help

Howard van Rooijen's EMC Consulting Blog (2004 - 2010)

This blog has now moved to http://howard.vanrooijen.co.uk/blog - please update your subscriptions if you wish to receive new content.

Visual Studio 2005: Invoke Smart Tag menu

A slick shortcut I stumbled across while doing some hobby coding at the weekend.

Add a new type to your class, in the code below it's an interface I want to implement. Place the cursor over word and a little Smart Tag indicator appears:

Place the cursor over the newly added type

Hit SHIFT-ALT-F10 and the smart tag menu appears with the option to add an import directive for the unknown type you have just entered.


Press SHIFT-ALT-F10

Hit the ENTER key and the import directory is automatically added.


hit ENTER

Using the shortcut keys is much simpler than trying to invoke the smart tag menu via the mouse. I really like the fact that the import directive is automatically added to the "Directives" region I had defined.

If you hit SHIFT-ALT-F10 again - the implement interface Smart Tag menu is displayed. I love the addition of smart tags to Visual Studio. Simple yet effective. I just wish there was a Smart Tag option for changing the access modifiers of members and that the Smart Tag analyzer engine wasn't case-sensitive (i.e. I could type in "iprovider" and the Smart Tag menu would still appear).

 

Published 27 June 2005 14:11 by howard.vanrooijen
Filed under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

jas said:

I don't get the red rectangle to show the smart tag in VS 2005 when I type, how do i enable it? (The shortcut key is enabled already) pls reply : jmahal@telus.net thanks
January 29, 2007 04:24
 

Bennor said:

Not sure if you've found this out already yourself, but there is a much easier shortcut key combination for showing the smart tag: Instead of SHIFT-ALT-F10, you can use CTRL-.
May 30, 2007 22:44
 

bucket said:

Thanks, this makes me way more productive, because I can just invoke the keyboard shorcut now rather than click the small thingey.

And if you don't like either, you can just go to the keyboard options (Tools -> Options -> Environment -> Keyboard), search for View.ShowSmartTag and change it into whatever you like. :-D

September 10, 2008 10:15
 

José Tavares said:

Well SHIF + ALT + F10 is also another shortcut (at least in VS 2008). Just write a method you haven't created yet hit SHIFT+ALT+F10 and the structure of the method is created.

October 9, 2008 16:26
 

andreim said:

i was looking for this. thank you, good post.

March 15, 2009 09:37

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

This blog has now moved - please visit http://howard.vanrooijen.co.uk/blog for new content!
Add to Live.com
Powered by Community Server (Personal Edition), by Telligent Systems