I know there is keyboard shortcut for single line(//....) commenting Ctrl + K + C and uncommenting Ctrl + K + U .
My question is that, is there any default keyboard shortcut for block (/* ...... */) commenting and uncommenting? If yes how?
And If there is no default block commenting keyboard shortcut defined, So is there a way i could add my own keyboard shortcut for this? How do i do that?
I have found lot of questions regarding commenting, but haven't found spoken about block commenting anywhere. Any help is appreciated :)
Alternatively referred to as Cmd+C, Command+C is a keyboard shortcut used to copy highlighted text or other object to the clipboard in a graphical user environment. On Windows computers, the keyboard shortcut to copy is Ctrl + C .
Ctrl-Shift-F is used to find all the ocuurance of a string with in entire solution and display find result window as shown below. Ctrl-F is used to find a string in the current document, project and all open documents one by one.
for me, in Visual Studio 2015 community edition, when I select full lines it will insert //
comments. If I select the lines only partially (the first line is not selected from the very beginning or the last line is not selected till the end), it will insert /*
comments. The shortcut is the same, Ctrl + K + C
.
Full lines selected:These lines will
be commented with //
Press Ctrl + K + C
Result:
//These lines will
//be commented with //
Partial lines selected:
These lines will
be commented
with /*
Press Ctrl + K + C
Result:
These /*lines will
be commented*/
with /*
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