Visual Studio Tips And Tricks
In this article, i will cover some tips that will make you, to have better experience of using visual studio.
Find active document on the solution explorer
when you are working on a file (for example writing code in a class) maybe you want to find this file on the solution explorer windows. use Sync with Active Document button on the solution explorer or use Ctrl + [ , s.
Jump to start or end of a block
in C#, when the cursor is next to the { or }, press the Ctrl + ] buttons.
NavigateBackward and NavigateForward
for jumping to the last position that you currently on it in the code view, use Ctrl + - and for back again to last position use Ctrl + Shift + -
Use Ctrl + Shift + V instead of the Ctrl + V
Visual Studio keeps the last 20 piece of text that have been copied. While holding down Ctrl + Shift , pressing V to see the clipboard cycle.
Peek definition in current windows
as your know, to see the definition of a class or object we can use F12, but if you want to see the definition in the current windows just use the Alt + F12.
Select a whole world
to select the whole world that is next to the cursor press Ctrl + w.
Multi-cursor in Visual Studio
If the lines are consecutive select the location in the first line and then use Shift-Alt and the up and down arrow keys to select multiple lines.
Multi-Caret Support (Visual Studio 2017 Version 15.8)
You can add multiple insertion points or carets. With Ctrl + Alt + Click
Expand/Contract Selection (Visual Studio 2017 Version 15.8)
To grow your selection to the next logical code block (Shift + Alt + +) and decrease it by the same block if you happen to select too much (Shift + Alt + –).