Finding Shortcuts in Aptana Studio 3.0 to Comment

2019-03-12 04:08发布

问题:

I can't find any shortcuts for comment my code in Aptana Studio 3.0. I need shortcuts both to comment individual lines and for commenting selected blocks of code.

Some have told me to try to comment with shortcut WIN + / on my Windows OS but that does not appear workable.

回答1:

It depends on which language you're writing in (is this CSS, Javascript, HTML?)

For Javascript:

  • Ctrl-/ to add or remove // for a single line of code, or for multiple selected lines.

The standard Java commenting shortcuts are:

  • Ctrl-/ to add/remove // for a single line of code, or for multiple selected lines.
  • Ctrl-shift-/ to add /* */ around selected code.
  • Ctrl-shift-J to add Javadoc comments.

You can always find out shortcuts by hitting Ctrl-shift-l, which will bring up a list of all currently available shortcuts. They will change depending on if you have anything selected, what type of file you're editing, etc. Look for "Add comments", "Toggle block comments", "Toggle JS comments", and so forth.



回答2:

I was having the same problem, looks like the keyboard makes the shortcut Shift-Ctrl-/ and similar ones completely useless (for the slash character) and Aptana does not allow you to change those shortcuts.

I used Ctrl-7 and works for any type of code you are selecting, if you want to un-comment just repeat the command.



回答3:

Check Commands > Source > Comments. A number of shortcuts are listed there.