Comment/un-comment blocks of code (using // comments)
Is there a way in IntelliJ to comment and un-comment blocks of code with the // characters?
For example, assume that I have the following code fragment:
I'd like to highlight the first 5 lines of this fragment and then run some sort of IntelliJ tool on it so that after the tool completes, the code looks like this:
Later, I'd like to highlight the same 5 lines, and then run the inverse function to remove the comments and turn it back into the original code fragment.
Yes, I know that I can use +/ ... /+ comments, but I'm looking for the specific functionality that I have described here, using +//+ comments.
Is this possible in IntelliJ?
By the way, I believe that either NetBeans or Eclipse offers this functionality, but I don't want to use either of these, because I love working in IntelliJ.
Please sign in to leave a comment.
Hi,
Control + /
Lloyd Zusman wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
simple comments on&off (//):
Highlight the lines and press ctrl-/
multiline comments on&off (/* */)
Highlight the lines and press ctrl-shift-/
Aha! Thank you very much!
I was looking for this in the Tools menu, and I didn't think of checking for keystroke commands.
Lloyd Zusman wrote:
You can also find it in the "Code" menu.
Bas
Lloyd Zusman wrote:
You can also find it in the "Code" menu.
Bas
Lloyd Zusman wrote:
You can also find it in the "Code" menu.
Bas
Sorry about the duplicates, I had some news client problems.
Bas