Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyboard shortcut in Visual Studio to select the Current Block

In VB Classic, VBA and also in Visual Studio you can dbl click close to the left hand margin of a block of code and it will select the whole of the current block (sub, function etc). In Visual Studio this clickable area is adjacent to the line numbers on the left.

Is there a keyboard shortcut that will do the same job? that is, select the "current block".

like image 702
hawbsl Avatar asked Oct 26 '10 08:10

hawbsl


People also ask

How do I select a block of code in Visual Studio?

Visual Studio for Mac makes it straightforward to select, cut, copy, and paste sections of your code. Rectangular blocks of code can be highlighted and selected by using the Option + Drag command on the code block.

How do I select current line in Visual Studio?

Shift + End = Select the entire line from start to end. Shift + Home = Select the entire line from end to start.

What is Ctrl K in Visual Studio?

Edit.SelectionCancel. Surround with. Ctrl+K, Ctrl+S. (available only in Visual Studio 2019 and earlier)

What does Ctrl Shift B do in Visual Studio?

CTRL+SHIFT+B to Build The built-in Microsoft visual studio means compile and connect only the root files that have been modified since the previous build.


1 Answers

Using ReSharper, repeatly press Ctrl-w it'll quickly select the desired scope.

like image 118
Carlo V. Dango Avatar answered Nov 14 '22 08:11

Carlo V. Dango