Visual Studio Tips and Tricks Advent Calendar for 2022
🎅 Day 4 - Peek Implementation on steroids with Resharper
Peek implementation, Ctrl + Alt + Q
Navigate using arrows ⬆
⬇
+ Enter
to select
🎅 Day 3 - Go To Line and Displaying Line Numbers
Go To Line, Ctrl + G
To display line numbers go to Tools->Options>Text Editor->All Languages
Sorry, your browser doesn't support embedded videos.🎅 Day 2 - Go To Definition and Peek Definition
To navigate to implementation details (Go To Definition), press F12
or
Ctrl + mouse click
.
To only peek on a definition, press Alt + F12
, which will open small panel below your cursor allowing you to edit the code without losing current context.
Pressing Alt + F12
multiple times will recursively open Peek Definition panel. You can navigate back (Ctrl + Alt + -
) and forth (Ctrl + Alt + =
) between different fragments using breadcrumbs.
You can close the Peek Definition view by pressing Esc
and switch between the editor and the definition window by pressing Shift+Esc
.
🎅 Day 1 - Navigate to Recent Cursor Positions
To navigate to recently visited/edited code in the current session, press Ctrl + -
. You can do this multiple times.
To navigate forward, press Ctrl + Shift + -
. The forward and backward mouse buttons also work in the same way.