Is there a way to comment/uncomment a block of selected text in IDEA?
Yes, highlight the block and type Ctrl + Shift + /. To uncomment, just repeat.
with Shift this makes for block style comments /**/
, without it for line style comments Ctrl + / -> \\
(tested with IDEA 10U)
Jetbrains provides a printable reference card with the default set of Windows and Mac key bindings.
For the benefit of others who might stumble across this question & answers... In addition to the windows key binding provided in other answers, there is also a keystroke for toggling a comment bock in IntelliJ IDEA on the Mac.
Line Comment
⌘+/
Block Comment
⌘+SHIFT+/
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