geeky · java

Eclipse 3.6 toggle comment findings

Despite of the usual convention of using ctrl+/, I found ctrl+shift+c is actually the way to go if you want it to work on everything.

I care mostly about being able to toggle comment in the following file types:

  • source code – comment with // or /* and */ block
  • markup e.g. xml/html – comment with <!– and –> block
  • property file value – comment with #

The following behaviors are tested in Eclipse version 3.6.

  • ctrl+/

    • source code: Toggles //
    • markup: No affect
    • property file value: Toggles #
  • ctrl+shift+/

    • source code: Only add but does not remove /* and */
    • markup: Only add but does not remove <!– and –>
    • property file value: No affect
  • ctrl+shift+c

    • source code: Toggles //
    • markup: Toggles <!– and –>
    • property file value: Toggles #

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s