问题
When I'm in peek preview, I sometimes wish to promote it to document. It's done by mousing on the icon as shown below.
On occasion (most of the occasion, in fact), my mouse is tired and wants me to use my keyboard for such promotion to document. According to the wisdom on the net, it's achieved by CtrlAltHome.
In my VS, there's nothing assigned to the key combination, so I'm guessing someone snack in and changed that without my permission. However, to restore it, I need to know what the command in Tools | Options | Environment |Keyboard is called.
I can't find anything appropriate there (I've tried different variations of the MS's description of the command: "Promote the Peek Definition window to a regular document tab").
So, what is it called? If it differs between versions, I'd like to know the name for each, where the peeking is avaialble (started in VS13, if I'm not mistaken).
Given the meaningful effort I've put into composing the image, every and each can clearly see that it's a crucial and important matter, given the circumstances.
回答1:
In Visual Studio 2013 the command name is Window.KeepTabOpen
.
回答2:
I had the same issue but on reverse. I hate the Peek Definition and didn't know how to get rid of it. Well, I found it. In Visual Studio 2017 you need to go to Tools -> Options -> Productivity Power Tools -> General -> Control click options. There you need to check/uncheck the Control click shows definitions in Peek
Hope it helps!
PS. In order to see Productivity Power Tools you need to get it first using NuGet
回答3:
A workaround for this (for Visual Studio 2015) is the following:
With focus on the peek window to open/dock:
- Close peek window
- Esc
- Go to definition
- F12
- Pin tab
- Alt+-, P
If there are multiple/nested peeks, then replace step 1 with:
- Previous peek window
- Ctrl+Alt+-
来源:https://stackoverflow.com/questions/32242258/what-is-the-command-for-promoting-a-peek-preview-to-document