可以在 VisualStudio2013中关闭 Peek 定义吗?

在 VisualStudio2013及以上版本中,当您使用 Ctrl + Click 时,会出现 偷看定义特性。起初我认为这很酷,但是我发现大多数时候,我需要点击 Promote to Document按钮,因为我对我的 Ctrl + Click 文件做了很多修改。但是,在谷歌如何关闭偷看定义,我不能找到任何细节,如果这是可能的。我真正希望的是 Ctrl + Click 功能能够回到在它自己的选项卡中打开定义,就像在 VS 的早期版本中那样,这可能吗?

16583 次浏览

Ctrl + Click -> Peek Definition is actually enabled by Productivity Power Tools. If you disable "Ctrl + Click Go To Definition" in Productivity Power Tools options then this behaviour will disappear.

In pre 2017 Visual Studio:

ToolsOptionsProductivity Power ToolsOther ExtensionsControl click shows definitions in Peek

Adam Garner pointed out that in Visual Studio 2017, the location is:

ToolsOptionsText EditorGeneralEnable mouse click to perform Go to Definition

If you have Resharper AND Productivity Power Tools, by default this will cause ctrl + click to go to definition AND peek the definition. Very annoying. The solution from @SnowFatal will turn off the peek functionality. Resharper's option is listed as "Go to Declaration on <Control + Left Click> in the editor".

For Visual Studio 2017 it is:

ToolsOptionsProductivity Power ToolsGeneralControl click shows definitions in Peek

In the latest version of Visual Studio 2017 (15.4.0) it is:

ToolsOptionsText EditorGeneralEnable mouse click to perform Go to Definition

You can either disable it by unchecking the box, or set a different key to trigger the mode.