How to comment a block in Eclipse?

前端 未结 17 2110
一整个雨季
一整个雨季 2020-12-07 08:52

Does Eclipse have a hot key to comment a block? and to uncomment a block?

17条回答
  •  伪装坚强ぢ
    2020-12-07 09:13

    There are two possibilities:

    Every line prepended with //

    ctrl + / to comment
    ctrl + \ to uncomment

    Note: on recent eclipse cdt, ctrl + / is used to toggle comments (and ctrl + \ has no more effect)

    Complete block surrounded with block comments /*

    ctrl + shift + / to comment
    ctrl + shift + \ to remove

提交回复
热议问题