Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commenting blocks in Eclipse on Mac

How do I comment blocks of code in Eclipse on a Mac?

like image 542
burntsugar Avatar asked Apr 12 '09 04:04

burntsugar


People also ask

How do I comment in Java on a Mac?

Single-line comments in Java start with two forward slashes ( // ). To quickly add a line comment in IntelliJ IDEA, press ⌘ / on macOS or Ctrl + / on Windows and Linux.

How do you comment out a block of code on a Mac?

Use the cmd + / key binding on the selected code.

How do you comment multiple lines in Java on a Mac?

For single line comment you can use Ctrl + / and for multiple line comment you can use Ctrl + Shift + / after selecting the lines you want to comment in java editor. On Mac/OS X you can use Cmd + / to comment out single lines or selected blocks.


1 Answers

Apple + Shift + / will toggle a block of selected code using /* */
Apple + / will toggle a line (or multiple, if selected) using //

You may have to disable the OS hotkey (apple + shift + / brings up the help menu)

like image 99
Darryl E. Clarke Avatar answered Oct 01 '22 03:10

Darryl E. Clarke