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 :)
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 /*