Go to declaration keyboard shortcut missing

2019-08-27 19:47发布

I installed Resharper and it over-wrote my keyboard shortcut for Go To Declaration. How can I set the keyboard shortcut back to F12?

I looked in Visual Studio Options > Tools > Options > Environment > Keyboard Shortcut. There are many shortcuts related to declaration here. I'm not sure which one to edit.

Image (missing shortcut key)

enter image description here

1条回答
\"骚年 ilove
2楼-- · 2019-08-27 20:21

When using the INTELLIJ IDEA schema you need to do a few things. Go to Visual Studio Options > Tools > Options > Environment > Keyboard Shortcut.

  1. Remove the F12 assignment from Resharper.ReSharper_GoToNextHighlight.
  2. Assign F12 to Resharper.Resharper_GotoDeclaration by selecting it in the options editor and clicking F12 > Assign.
  3. You may also have to remove F12 assignment from Edit.GoToDefinition. F12 being assigned to another button causes some bizarre stuff to happen.

    enter image description here

Now F12 should display in the context menu and function correctly.

Alternatively, if the shortcut to "Go to Declaration" has simply become unbound then reset it back to the default of CTRL+B. In Visual Studio top menu > Resharper > Options > Environment > Keyboard and Menus > Select IntelliJ IDEA schema > Apply Scheme.

enter image description here

查看更多
登录 后发表回答