By default, Peek Definition is performed if you click Alt
+F12
in VS 2019. If you use mouse click + Ctrl
then Go to Definition is performed.
Is there also an option to use the combination of mouse click and a keystroke to perform Peek Definition?
Ctrl-click Go To Definition To quickly navigate to the definition of a symbol, press the Ctrl key and then click on it. It's that easy!
You can peek a definition by choosing Peek Definition from the right-click menu for a type or member that you want to explore. If the option is enabled, you can also peek a definition using the mouse, by pressing Ctrl (or another modifier) and clicking the member name.
Visual Studio Go To Definition The Go To Definition feature navigates to the source of a type or member and opens the result in a new tab. Using Keyboard, place your cursor on the member name and press F12. Using the mouse, right-click on the member name and select Go To Definition from the menu.
You need to set an option first (documented below).
So...CTRL+Click will go to the definition. You can make it open a Peek window by changing an option.
Click Tools->Options
Under Text Editor->General
Enable mouse click to perform Go to Definition (should be checked)
Check the Open definition in peek view
Now Ctrl+Click will open a peek window.
You could also just right click on it and Peek Definition.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With