Does Eclipse have a hot key to comment a block? and to uncomment a block?
+7
A:
Ctrl-/ to toggle "//" comments and Ctrl-Shift-/ to toggle "/* */" comments. At least for Java, anyway - other tooling may have different shortcuts.
Ctrl-\ will remove a block of either comment, but won't add comments.
Jon Skeet
2010-01-04 19:29:57
+3
A:
There are two possibilities:
Every line prepended with //
ctrl + / to comment
ctrl + \ to uncomment
Complete block surrounded with block comments /*
ctrl + shift + / to comment
ctrl + shift + \ to remove
Ikke
2010-01-04 19:30:18
Ctrl-\ will only *remove* comments.
Jon Skeet
2010-01-04 19:33:53
My bad, my memory let me down, fixed it now.
Ikke
2010-01-04 19:52:10
+1 for being more descriptive about the differences than the other guy.
invertedSpear
2010-05-24 21:00:48