Some nice code editor features provided by the VS 2010 Power Tool Extensions
page 2 of 8
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 29550/ 93

Ctrl+Click "Go to Definition"

One of the small, but useful, features that I find myself using a lot with the extensions is the "Ctrl + Click” go to definition feature. 

For those of you who haven’t tried it, it enables you to quickly navigate to the definition of a member or type within your code.  You can accomplish the same behavior out of the box with Visual Studio by right-clicking on a member/type and then choosing the “Go to Definition” context menu item – or by moving your cursor over a type/member and then pressing the F12 key.  But for some reason I’ve found the Ctrl+Click gesture provided by the VS 2010 Power Tool Extensions more natural and faster to use (since for my keyboard the F12 key requires a split-second extra finger move to use – whereas the control key is always in easy reach).

To try out the “Ctrl+Click” behavior, just hold down the “Ctrl” key and use your mouse to hover over a type or member in your code.  When the extension is enabled you’ll find that this causes a hyperlink to appear under each type/member you hover over:

image

Clicking the hyperlink will immediately navigate you to the definition of the type/member within your code:

image

Note that the “go-to-definition” feature in VS can also be used on a type that you don’t have source access to.  For example, like with the DbSet<T> collection I used in my EF “code-first” blog post yesterday:

image

When you click a type referenced from a binary library, VS will automatically generate a class definition based on the signature compiled into the assembly:


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-18 10:32:58 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search