10

Is there a shortcut to jump between partial classes for the same class in the VS2012 editor? I know I can use search but I was hoping for a shortcut.

Blorgbeard
  • 101,031
  • 48
  • 228
  • 272

7 Answers7

11

Use the drop-down list of class members. Grayed-out members reside in other parts of the partial class. Select the appropriate member that will bring you to the desired class part.

5

A bit late to the game but in Resharper 2016.3 the short cut for this is:

Ctrl+Alt+F7

The function is called: Related Files.

IbrarMumtaz
  • 4,235
  • 7
  • 44
  • 63
3

You could put the text cursor over the class name, then hit F12 to show where all the definitions are, then use the up and down arrow keys to change which partial class you want to be looking at (you could also try shift+f12 or ctrl+k,r if f12 doesn't work). It won't be perfect, but it's a little easier than using search window.

See this answer to a previous question: Find another part of PartialClass in Visual Studio IDE?

Community
  • 1
  • 1
David Sherret
  • 101,669
  • 28
  • 188
  • 178
2

With Resharper I do the following steps:

  • Ctrl+Home - to navigate to the beginning of the current file;
  • Alt+Down - to navigate to the first class (each class I put in a separate file if possible);
  • F12 - to go to partial.

Maybe there is a faster way, I would like to know.

L Y E S - C H I O U K H
  • 4,765
  • 8
  • 40
  • 57
Stanislav
  • 4,389
  • 2
  • 33
  • 35
0

I know with Resharper, you can Ctrl-click on a partial class declaration name, and it will allow you to navigate to the other parts. Not sure about vanilla Visual Studio.

CSJ
  • 3,641
  • 2
  • 19
  • 29
0

You can also use Alt+Shift+L to navigate to the current file in your solution explorer; then you can up/down to the other parts quickly.

CSJ
  • 3,641
  • 2
  • 19
  • 29
  • My bad. Another Resharper shortcut. Try [this answer](http://stackoverflow.com/questions/6238719/visual-studio-shortcut-to-navigate-to-solution-explorer) – CSJ Jul 16 '13 at 01:05
  • its Ctrl+Alt+L that will set the focus to the solution explorer. – Asdfg Jul 16 '13 at 01:22
-1

In VS 2012 you have the forward/back navigation buttons on the Standard Toolbar. These buttons, that look like browser buttons, can be used to navigate your code and designers. The keyboard hotkeys for the buttons are Ctrl + - (minus sign) for back and Ctrl + Shift + - for forward.

It's easy to overlook them. I didn't notice them until a few weeks ago.

VS 2012 Navigation Buttons

jfrankcarr
  • 481
  • 3
  • 6