Go to class member quickly using keyboard only

I'm migrating to VS 2005 (C#). Up to now I've been using VS 2003 with Resharper. I see VS 2005 now implements many of ReSharper "goodies" (refactor, rename, add 'using' etc).

However I still can't go to a class member quickly using keyboard only.

E.g. in ReSharper (VS 2003) I'd press a shortcut which would display "file structure", then a member would get selected as I type letters it starts with, hit enter and I'm in the member.

Long time ago (VS 97/VC++ 5.5 I think), "Class Members" combo box (VC++ editor) were "trackable" (i.e. selection would position on the member starting with the letters type) and one could assign shortcut to expand/focus on members combo box. It's long not the case any more - "members" combo box tracks only 1st letter (both in VC++, C# and others probably).

Is there any workaround to achieve this I've seen many developers using the above feature in VS 2003/ReSharper so I'm sure I'm not the only one who would like VS 2005 support it natively ...

Thanks,

Luke



Answer this question

Go to class member quickly using keyboard only

  • sdknewbie

    Thanks for the answer.

    It doesn't seem to be a workaround I'm looking for though ...

    When I switch to a ClassView, the focus is not on the class the code of which I have currently in editor (SolutionExplorer actually does that - it focuses on the file) ... Manually selecting one is slow - especially in a solution with multiple projects. Plus since namespaces are included, "tracking" doesn't work all that great.

    I tried using search as you suggested but it searches accross "everything" - not in current file ... Overall, I think the type browser is somewhat better then ClassView (which is in my opinion quite useless), but it's still not what I'd want ... I guess I must stick to ReSharper after all ...

    Thanks anyway,

    Luke


  • Si Keen

    You are searching for ObjectBrowser. For your code file open ObjectBroser and start typing, find the member and press Enter. Shortcut for this is Ctrl + Alt + J or from View menu.
    Not all goodies from ReSharper are implemented. That is why I'm still using it in VS2005.

  • osamaT

    There is also the Synchronize Class View command. Which was removed from the menus in VS 2005; but you could create shortcut keystroke or chord for it. Or, make it a step in a macro that had a shortcut. It sychronizes the class view with the current file and method (if your cursor is over a method declaration or within the body) and gives focus to the Class View.

    Anson Horton explains how to add it "back" to the menus (if you've used them in VS 2003) here: http://blogs.msdn.com/ansonh/archive/2005/12/09/502020.aspx



  • Craig McGuff

    You might also consider CodeSkipper. It has very fast typeahead keyboard navigation. You can search for types, qualified type members, or the members within the type you're currently editing. You can even filter them by various criteria, like a particular namespace, interface implementor, etc. There are flash demos here (for typeahead) and here (for filtering) that show how this works.

    Ken
    www.coopercode.net

  • thewalrus

    I work on windows projects and for me works perfekt. Of course i always use the latest version of it. Now it's not that much a performance problem because all of design source is in diferent file, and not in same file like in VS.2003. But stil you need to have a good machine also.
    I had problems with beta versions, but that was year ago, not lately. At the end, if you have some problems, you can contact them and show them the problem, they will be happy to remove that bug.

  • nhaas

    Thanks for all tips. After all I think I'll still need to use ReSharper nonetheless ;), but it's great to know the tricks you described.

    Boban,

    Btw. How do you find stability of VS2005 with ReSharper (I experienced a lot of VS crashes with VS2003 + RS / ASP.NET projects, and I have reasons to believe some at least are due to RS)

    Thanks,

    Luke


  • Fyrus

    You could assign a shortcut to the View.ClassViewSearch command. Or, with the C# keyboard layout Cltr+W,C to switch to the class view and you can navigate that tree with the up/down arrows, plus/minus buttons, and type in the name of the class--much like any other tree view.

  • Go to class member quickly using keyboard only