Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable peek on go to definition

In visual studio when i press F12 (go to definition) on any methods it open in a "peek" kind of window on the right side of the document tabs in fushia/pink like color on the dark theme. The problem is that 99% of the time i need to F12 into 2 or more methods but that window keep being replace by the latest. So i need to remember to click pin for every single time i press F12. I am wondering if i can disable this peek and make F12 open in a normal window like i opened the class.

I already disabled the preview class on the project treeview which open any class in the same "peek" tab.

I found some help but for VS2013 with powertool but VS2015 these tools are integrated and i didn't found the equivalent option menu.

My VS is up to date excluding the latest Azure update which i don't use.

like image 845
Franck Avatar asked Dec 23 '15 14:12

Franck


People also ask

What is the difference between peek definition and go to definition?

Peek Definition and Go To Definition show the same information, but Peek Definition shows it in a pop-up window, and Go To Definition shows the code in a separate code window.

What is peek definition in Visual Studio?

Visual Studio's Peek Definition feature allows you to view and edit source code of a referenced symbol right on the spot, without opening another new tab.

How do you enable to define in Vscode?

Go to Definition# If a language supports it, you can go to the definition of a symbol by pressing F12. Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.


4 Answers

Check the Visual Studio options:

  • Disable "Control click shows definitions in Peek" option in: OptionsProductivity Power ToolsOther Extentions.
  • Disable "Allow new files to be opened in preview tab" in: OptionsEnvironmentTabs and Windows.
  • Ensure you have F12 key assigned to Edit.GoToDefinition per Global scope in: OptionsEnvironmentKeyboard.

UPDATE: It works for Visual Studio 2017 as well.

like image 143
Ilya Chumakov Avatar answered Oct 04 '22 01:10

Ilya Chumakov


In visual studio 2017, professional edition:

In visual studio 2017, professional edition

like image 33
MStack Avatar answered Oct 04 '22 02:10

MStack


For Visual Studio 2019, you can find the setting under Options->Text Editor->General->Enable mouse click to perform Go to Definition->Open definition in peek view

like image 4
ElFik Avatar answered Oct 04 '22 02:10

ElFik


Following the accepted answer didn't work, I solved by unchecking:

enter image description here

I'm using Visual Studio 2015 Pro

like image 2
Phate01 Avatar answered Oct 04 '22 00:10

Phate01