Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to select block of code in Visual studio just by double click like in Eclipse?

In Eclipse you can double click next to an open brace and that selects the block of code, however in Visual Studio you need to press the CTRL+SHIF+]! How can i edit this shortcut so that simply a double click does the same thing? (holding too many keys is just too much)

like image 964
C graphics Avatar asked Jul 06 '15 05:07

C graphics


People also ask

How to select a block of code in Visual Studio?

How to select a block of code in Visual Studio. This is quite interesting and a handy tip. You can use it very often during your development when you want to select a complete code block very quickly. Keep you cursor either at the starting or at the ending braces Just press Ctrl + Shift + ] . You will find the complete code block is being selected.

What is Visual Studio Code tips and tricks?

"Tips and Tricks" lets you jump right in and learn how to be productive with Visual Studio Code. You'll become familiar with its powerful editing, code intelligence, and source code control features and learn useful keyboard shortcuts.

How does the block selection key combination work?

For example, if the cursor is inside the function parenthesis list, and you use the block selection key combination, it selects the current parameter. On using it again, it selects all the parameters (if there is more than one parameter). The next time, it selects the entire function. The next time, it selects the entire class.

How to select the complete code block from a list?

Keep you cursor either at the starting or at the ending braces Just press Ctrl + Shift + ] . You will find the complete code block is being selected. 1. Put the cursor at the starting of the block 2. Press Ctrl + Shift + ] You will find the complete code block between the start and end braces has selected.


1 Answers

To change how the text editor interacts with the mouse, you'll have to develop a Visual Studio extension. Or, you can just change the keyboard shortcut to perform this action to whatever you like. You can do this from Tools/Options/Environment/Keyboard and select the command Edit.GotoBraceExtend. Enter the new shortcut in Press shortcut keys by pressing them then click Assign and OK.

enter image description here

Note that if the shortcut you have selected was assigned to some other command, the assignment will change.

like image 140
Hadi Brais Avatar answered Nov 15 '22 05:11

Hadi Brais