Go To Definition

Free

Make ctrl+click perform a "Go To Definition" on the identifier under the cursor. Also, when the ctrl key is held down, highlight identifiers that look like they have definitions to navigate to.

(59) Review
Visual Studio
2013, 2012, 2010
Download (113,849)
11/10/2013
2.5
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (59)
Q and A (26)
Sign in to write a review
Sort by:

by IrvingDoe | December 01 2012

Can't live without it!

by Paulius Žaliaduonis | November 09 2012

Useful.

by Shimmy Weitzhandler | October 31 2012

Great tool very useful!

I have another good suggestion:
When in debug, Ctrl + Click (or Ctrl + Right Click) should lead to Quick Watch.

Thanks Noah!

by Roberto Yglesias - Buildingi | October 30 2012

This should be a default functionality on VS by now...

Thanks for the contribution!

by tbomb80 | October 18 2012

Keep up the great work!

by Urbanion | September 21 2012

Should be as default feature.

by Muckrucker | September 18 2012

by Rudolf Grauberger | September 16 2012

Must have !!! :-)

by Andre.Ziegler | September 13 2012

absolutely must have extension for VS

by lucianomx | August 29 2012

Why isn't it default or at least native (configurable) in Visual Studio ?

by Cyril PERNOT_ | July 16 2012

Simple, but very useful :)

by JohnLeo Carton | July 07 2012

How did i survive without this!!!

by Mr. Wharty | June 08 2012

Brilliant little utility

by Sean Ireson | October 21 2011

perfect! should be included out of the box.

by Ehsan Mohammadi | October 08 2011

by cportwood | September 16 2011

Simple but awesome extension. I'm spoiled now... I get a put off when I try and use someones machine that doesn't have this.

by OctoberS | July 16 2011

Thank you for this very much!

by PinkFloyd | June 08 2011

Thank you very much for making this!

by Matthew Manela | May 24 2011

by ScruffyDuck | May 22 2011

I use this every day - excellent, could not be without it!

21 - 40 of 59 Items   
Sign in to start a discussion


  • Go to definition across different languages
    1 Posts | Last post November 28, 2013
    • I've had a problem for ages while working on a legacy site that was built in VB.NET and we've added C# projects to it.
      The problem seems to be that Go To Definition doesn't work across the projects. 
      I even tried setting up a test solution to see if the problem existed on a brand new one and it still did.
      
      I've tried all the solutions I've found on the net around using Project References and not File ones but nothing seems to work.
      
      Well, one thing works. ReSharper. Unfortunately, ReSharper is quite overkill just to get Go To Definition working properly...
      
      Is there any chance your extension could fix this bug and enable the Go To Definition (And Find Usages if possible :P) across projects?
  • Can this be modified to perform a Peek Definition?
    3 Posts | Last post November 20, 2013
    • I love this extension.
      
      Is it possible to have a different combo (perhaps CTRL+ALT + left click) do a peek definition in addition to the default CTRL + left click performing a goto definition?
    • Hey Noah.
      
      I'm not comfortable in making this change myself. Given your response to my review comments indicating that it wouldn't be too hard to implement peek definition and find all references with a non-configurable key combination, would you consider?
      
      Perhaps:
      CTRL + Left Click == goto def
      CTRL + Middle Click == peek definition
      CTRL + Right Click == find all references
      
      what do you think?
    • ...well now that MS's PPT 2013 extension is out, which can do a peek definition with the ctrl-click, I guess this request (and extension) is no longer needed...
      
      unless this one provides the ability to do both (peek and goto def) via different mouse buttons / key combo.
  • [Shift] + [Ctrl] + Click
    3 Posts | Last post November 10, 2013
    • without this plug-in, when I click on a word, hold [Ctrl] and [Shift], and click on another word, it selects the everything between both clicks including the whole words.
      however when I have this plug-in installed it tries to jump to the word I click on even if it isn't a hyperlinked one.
      
      it would be nice if you ignored jumping if, other keys were pressed, specifically in this case the [Shift] key.
    • Hi, the functionality you're describing doesn't require the use of the Ctrl key. Click once in the file, then Shift+Click to where you want the selection and it should select everything in-between. Ctrl is not needed.
    • Hey Ben, 2.5 should now ignore shift+ctrl as a combination. Let me know if you get a chance to try it out. Thanks!
  • Please make this work with VS13
    5 Posts | Last post November 10, 2013
    • I love this little extension please make it work for vs 2013
    • +1 
    • Highly needed for VS2013!
    • Sorry guys! I'm working on it, but I lost my windows VM and so I had to rebuild things (a few days of installing software and updates). I should be all set up to rebuild and then test with vs2013, so I'm hoping to get it done this weekend.
      
      -Noah
    • 2.5 should now support VS2013. Let me know if you run into any issues, thanks!
  • Ctrl+Click works for all possible tokens in DSL
    7 Posts | Last post August 26, 2013
    • @Noah, I changed the names of the "identifier" DSL tokens so that the "conflict" doesn't exist anymore. But now I have another problem, which only occurs while the documents of my DSL are part of a C++,C# project. 
      
      GoToDef tries to find the definition of all tokens in my document, even though the names of the tokens are completely irrelevant with your extension. 
      
      The funny thing is, that only the tokens I allow in my extension are underlined, but when I click, your command handler is invoked rather than mine. 
      
      All this started to happen, as I added an ILanguageInfo implementation to my plugin. If I remove this, everything works as it should.. 
      
      Any ideas ?
    • Correction, it occurs even if the document is not part of a C++ project. The underlining works fine according to my plugin - but the cursor does not change and when I click on an item your command handler is getting called instead of mine.
    • During debugging, I found out that your command handler is called after my command handler. I think I will have to debug your plugin :).. I'll keep you posted.
    • I managed to workaround through your plugin. I had to implement IVsCodeManager and add a filter for my textview in between. 
      
      Would it not help if you export your plugin only for C++,C# etc. instead for text content type ?
    • (When you say "text" content type, are you talking about the classifier? The mouse handler is "code", so the rest of the question assumes you meant that)
      
      > Would it not help if you export your plugin only for C++,C# etc. instead for text content type ?
      It would probably help your specific issue to enumerate which content types support GoToDef, though then it'd have the opposite problem from this: opt-in instead of opt-out, so it would miss supported languages. It turns out that many/most third party languages, even DSLs, tend to implement Go To Definition for *something*, even if it isn't a "definition".
      
      Your case is an interesting one, though. Content types don't provide an anti-list, so there's no good way to say "code, but not some other content type". Added to that, VS doesn't ship with a standard "DSL" content type or, more appropriately, an "I-support-Go-To-Definition" content type, so all the extension can really do is guess. I had always hoped that the product team would make it a part of VS and make it possible for these to be less hacky, but the good/bad thing is that the extension tends to work pretty close to correctly in most scenarios, so I don't think there was a strong desire to spend the extra effort making it perfect. I wouldn't know, though, as I left VS/Microsoft over 2 years ago.
      
      As for the mouse handler, if your handler is being called first and you don't want anything else to happen with that mouse event, you can mark e.Handled to true. It may not be the right solution in the general case, since there may be some later default behavior that's desirable, but it's worth testing, at least.
      
      All said, I'd still be happy to add some manual logic (to the mouse handler provider) to have it skip files of your DSL's content type, or some base content type that you've created and that others could use to opt-out. Just let me know, or send me a pull request on github.
      
    • Sorry, yes I meant code. The funny thing is, I tried debugging your plugin and it actually works as expected, because now I am exporting a content type specific for my DLS which does not even derive from text.
      
      But with power productivity tools it does not work. As this code is not open source, I can't debug, now do I have any idea where the problem may lie.
    • You can probably use .NET reflector to see what the productivity power tools version is doing.
      
      If this version of the plugin isn't incompatible with your plugin, you may want to consider moving/copying your review or other pertinent information to that extension's page. I don't have any control over that version and I don't even know who works on it (internally at Microsoft), so I won't be of much help there, sorry :(
  • Using Peek Definition in VS 2013
    2 Posts | Last post August 21, 2013
    • VS 2013 has a new feature called Peek Definition that is similar to Go To Definition but it shows the definition in line with your current location instead of opening the definition in a new window.  It would be cool if this extension could support Ctrl-Click to either Go To Def or Peek Def.
      
      http://msdn.microsoft.com/en-us/library/vstudio/dn160178(v=vs.120).aspx
      
      BTW, this extention works in VS 2013 by unpacking the VSIX and adding a VS 12 to the <SupportedProducts> collection in the extension.vsixmanifest file.
    • Assuming that peek def has a new command group and command id, it would just be a matter of figuring it out and substituting it here:
      https://github.com/NoahRic/GoToDef/blob/master/GoToDefMouseHandler.cs#L340
      
      Looking through the docs for 2013, it looks like you want:
      Microsoft.VisualStudio.VSConstants.CMDSETID.StandardCommandSet12_guid
      and
      Microsoft.VisualStudio.VSConstants.VSStd12CmdID.PeekDefinition
  • How to Switch to "Highlight-Word-Under-Cursor" as in SSMS?
    2 Posts | Last post July 31, 2013
    • Hi all.
      
      Is it actually possible to change this?
      Double-click is not convenient for me and I have been using SQL Server Management Studio with CTRL+Click to highlight a word for years.  In many situations with partial replacements this is the fastest method.
      
      Thank you,
      Rafael
    • Aha, found it!  Tools==>Options==>Productivity Power Tools -> turn off the feature in the right pane :)
  • Visual Studio 2012 Express
    3 Posts | Last post April 24, 2013
    • Is the extension working in visual studio express 2012?
      
      I use it in visual studio professional 2010 and I can't live without it!
      
      I am trying vs express 2012, but i am not able to install gtDef, it says it's already install for all possible products...
      
      Thanks and keep up the good work!
    • The Express editions of VS don't support any (non-microsoft) extensions, sorry!
      
      -Noah
    • You can use this short autohotkey script to do this with middle mouse button. Just store this code as .ahk file and run it.
      
      SetTitleMatchMode, 2
      #Persistent
      #IfWinActive, Microsoft Visual Studio Express
      MButton::
        Click
        Send {F12}
        Return
      #IfWinActive
  • Does not jump on Ctrl+click, but jumps on F12
    1 Posts | Last post January 10, 2013
    • Hi, it seems I have found some kind of conflict with another extension: "Highlight all occurrences of selected word" (http://visualstudiogallery.msdn.microsoft.com/4b92b6ad-f563-4705-8f7b-7f85ba3cc6bb)
      
      The extension highlights all occurrences of a selected word in the current document. My usual use case is to double-click an identifier, look at it's highlighted occurrences in the current context and then ctrl+click it to go to the definition. When I disable that highlighting extension I can navigate using ctrl+click, otherwise I get the highlighting on ctrl+click. 
      
      It is reproducible on a tiny snippet like this:
      #include <iostream>
      int main(int , char**) 
      {
          int myint = 5;
      
          std::cin >> myint;
          myint += 1;
          std::cout << myint;
      }
      
      I am using VS 2010 and the 2.4 version of your extension.
      Could you suggest any workaround?
  • Doesn't work for ids of HTML elements
    8 Posts | Last post November 28, 2012
    • This simply doesn't work for me. It only works for classes.
      
      Using 2.4 with VS 2012.
    • What language?
    • To be fair, I've never tested this with VS2012 (I've never used VS2012). If the classification of method names has been changed, it would stop the extension from working. It currently only matches:
      if (name.Contains("identifier") || name.Contains("user types"))
      
      If you (or anyone else) can let me know what the name is, I can add it to that list pretty easily.
    • Language: HTML.
      
      I don't know an answer to your other question. Would you be able to download a trial version of VS 2012 and get the information you need?
      
      Alternatively, could you guide me into obtaining an answer for you?
    • I'm not sure I remember what it is supposed to do in HTML.
      
      If you click on something that isn't underlined but you think should be, and you press F12 (or whatever Go To Definition is bound to), does it navigate someplace? If you have the extension installed, you can do the same by ctrl-clicking, even if it isn't underlined, if that helps.
    • F12 also ignores ids and also works for classes.
    • This won't work in any case that F12 doesn't, it just programmatically invokes F12 (+ a heuristic for the underlining).
    • Got it. I have filed a bug report about this: https://connect.microsoft.com/VisualStudio/feedback/details/772443/pressing-f12-doesnt-take-users-to-css-definitions-based-on-ids-of-html-elements. I hope other could reproduce it, click on the "I can too" link there and also vote for the bug.
1 - 10 of 26 Items