Eclipse comment/uncomment shortcut?

前端 未结 17 1202
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 16:23

I thought this would be easy to achieve, but so far I haven\'t found solutions for comment/uncomment shortcut on both Java class editor and jsf faceted we

相关标签:
17条回答
  • 2020-11-30 16:56

    CTRL + 7

    does comment/uncomment in the Java Editor.

    0 讨论(0)
  • 2020-11-30 16:56

    Source -> Remove Block Comment

    link

    0 讨论(0)
  • 2020-11-30 16:58

    An easier way is to press Ctrl + Shift + C, just like in Code::Blocks

    0 讨论(0)
  • 2020-11-30 16:59

    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.

    0 讨论(0)
  • 2020-11-30 17:01

    Ctrl+/ to toggle "//" comments and Ctrl+Shift/ to toggle "/* */" comments. At least for Java, anyway - other tooling may have different shortcuts.

    Ctrl+\ will remove a block of either comment, but won't add comments.

    EDIT: It's Ctrl on a PC, but on a Mac the shortcuts may all be Cmd instead. I don't have a Mac myself, so can't easily check

    0 讨论(0)
  • 2020-11-30 17:02

    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 + / (Forward Slash)

    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

    0 讨论(0)
提交回复
热议问题