Eclipse comment/uncomment shortcut?
Solution 1:
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 ⌘ + / to comment out single lines or selected blocks.
Solution 2:
Use
Ctrl + SHIFT + L which will open a list of all major shortcuts for eclipse.
For single line java code comment and uncomment : Ctrl + / (Forward Slash)
-
For multiple line java code comment : Ctrl + Shift + / (Forward Slash) and
Multiline uncomment : Ctrl + Shift + \ (Backslash)
For single line xhtml code comment/uncomment : Ctrl + Shift + c
-
For multiple line xhtml code comment : Ctrl + Shift + / (Forward Slash)
For multiple uncomment : Ctrl + Shift + \ (Backward Slash)
For Mac user it will be: ⌘ instead of Ctrl
Solution 3:
CTRL + 7
does comment/uncomment in the Java Editor.
Solution 4:
- Single line comment Ctrl + /
- Single line uncomment Ctrl + /
- Multiline comment Ctrl + Shift + /
- Multiline uncomment Ctrl + Shift + \ (note the backslash)
Solution 5:
An easier way is to press Ctrl + Shift + C, just like in Code::Blocks