Eclipse comment/uncomment shortcut?

前端 未结 17 1201
隐瞒了意图╮
隐瞒了意图╮ 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 17:03

    A simple way of doing is to press Ctrl + Shift + C, on the lines of your code.

    For comment and for uncomment do same .. :)

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

    Select the code you want to comment, then use Ctr + / to comment and Ctrl + / also to uncomment. It may not work for all types of source files, but it works great for Java code.

    0 讨论(0)
  • 2020-11-30 17:06
    1. Single line comment Ctrl + /
    2. Single line uncomment Ctrl + /

    1. Multiline comment Ctrl + Shift + /
    2. Multiline uncomment Ctrl + Shift + \ (note the backslash)
    0 讨论(0)
  • 2020-11-30 17:06

    Single comment ctrl + / and also multiple line comment you can select multiple line and then ctrl + /. Then, to remove comment you can use ctrl + c for both single line and multiple line comment.

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

    You can toggle the comment on one line or selection by using the shortcut Ctrl + / This adds/removes the // infront of the code line

    You can block comment /* */ using the Ctrl + Shift + / eclipse shortcut

    You can find a complete list of useful eclipse shortcuts here http://javatutorial.net/eclipse-shortcuts

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