Eclipse comment/uncomment shortcut? Eclipse comment/uncomment shortcut? java java

Eclipse comment/uncomment shortcut?


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.


Use

Ctrl + SHIFT + L which will open a list of all major shortcuts for eclipse.

  1. For single line java code comment and uncomment : Ctrl + / (ForwardSlash)

  2. For multiple line java code comment : Ctrl + Shift +/ (Forward Slash) and

    Multiline uncomment : Ctrl + Shift +\ (Backslash)

  3. For single line xhtml code comment/uncomment : Ctrl + Shift +c

  4. 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


CTRL + 7

does comment/uncomment in the Java Editor.