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)
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.
"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.
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.
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.
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
.
Note that if the shortcut you have selected was assigned to some other command, the assignment will change.
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