49

if I do CTRL-click on method's name in VS2012 with Resharper 8, I'm redirected to the method's "declaration" - and that's quite inconvenient if I have lots of interfaces in my project.

If it possible to configure resharper to go right to the IMPLEMENTATIONS of the method (and if there is more than one - display a context menu which I need to select the desired method from)? I can achieve this if I do right-click -> "Go to Implementation" but I really prefer to have this on ctrl-click.

avs099
  • 10,937
  • 6
  • 60
  • 110
  • 1
    I just "Go to definition" then press Alt + End on the interface. It takes you to its implementation. Extra key press.. but not too bad. – Simon Whitehead Nov 30 '13 at 00:23
  • 1
    See my answer to the same question here: http://stackoverflow.com/questions/20179998/rebind-controlleftclick-in-resharper/20195658#20195658 – citizenmatt Dec 02 '13 at 08:52
  • Alt + F12 = Peek Definition, then ALT + End = Peek Implementation – Lee Jan 14 '15 at 19:37

4 Answers4

88

CTRL+Click = Go to declaration

CTRL+ALT+Click = Go to implementation

CTRL+SHIFT+Click = Peek to declaration (Visual Studio 2013)

vahid abdi
  • 9,636
  • 4
  • 29
  • 35
RuudKok
  • 5,252
  • 2
  • 26
  • 27
  • Is there an alternative to that mouse click? – haku Apr 18 '15 at 01:46
  • ctrl+alt+click does goto implementation, but it opens it in a new pane. WHYYYYY?? Can I turn off that new pane and just have a normal tab? – ThaJay Apr 21 '21 at 11:29
7

I don't think you can re-assign the CTRL+LeftClick Option. Per their documentation.

By default, Go To Declaration is available by Ctrl + left-click. To change the default behavior, use controls on the Search & Navigation page of the Options dialog box. For more information, see ReSharper Options: Environment: Search & Navigation

Since it says "change", I went and checked the Search & Navigation section mentioned above to verify if this behavior can indeed be changed. But the change is simply a Checkbox that says.

Go To Declaration on <Control + Left Click> in editor.

I unchecked this option and saved it, and now, I get nothing if I CTRL+Left Click a method name. So I think you can only disable or enable this option, not re-assign the keys.

Shiva
  • 20,575
  • 14
  • 82
  • 112
5

Keyboard only options:

CTRL+F12 OR ALT+END = Go to implementation

F12 = Go to declaration

ALT+F12 = Peek declaration

Steven Banks
  • 863
  • 7
  • 7
2

There are 2 solutions for it:

  1. CTRL + ALT + Left Click - default behaviour
  2. VS: Tools => Option => Environment => keyboard => Search "ReSharper.ReSharper_GotoImplementation" and then assign the key you want.
nishantcop
  • 977
  • 1
  • 8
  • 24