Finding Shortcuts in Aptana Studio 3.0 to Comment Code [closed]
Asked Answered
D

3

35

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.

Dentoid answered 11/5, 2011 at 8:40 Comment(2)
Have you found it already? I have the same problem.Tannen
Nope. In Aptana for Linux it works. Now I use OSX and Textmate :)Dentoid
O
32

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.

Orford answered 11/5, 2011 at 8:48 Comment(5)
Nice answer, but in my Aptana I only have comments for PyDev... Any shortcuts for comments don't exists :( I have downloaded Aptana from official site - why my IDE hasn't this shortcuts?Dentoid
Have you installed PyDev as a separate plugin? Are you writing PHP files or HTML, or something else?Orford
Yes, PyDev is installed. I don't know how - as separate or something else...Dentoid
For what it's worth, while CTRL-SHIFT-L brings up a list of shortcuts commenting out shortcuts aren't listed (CTRL-SHIFT-/ and CTRL-/). At least, not for PHP.Planetstruck
For anyone asking themselves why command+7 does not work on mac go to preferences->general->keys and select "toggle js comments" and make sure that "Javascript editor scope" is selected!!! This fixed the problem for me.Paradise
C
34

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.

Chilopod answered 16/4, 2012 at 4:40 Comment(4)
Wow, amazing that this question and top answers were posted a year ago, and you just now you posted your answer -- amazing because I just now had this problem and the top answers didn't work for me, but this does (if I had had this problem yesterday instead I'd be out of luck). Thank you!Dingy
Thanks for the tip. This worked for ruby code. FYI its Cmd-7 on Macs yo!Caitlin
+1, how intuitive, should have known ctrl-7 would the obvious comment line(s) shortcutHallucinatory
The problem is that it is not block comment, and ctrl+shift+7, at least in my Aptana 3.4.1 over PC or Mac, doesn't work.Hieratic
O
32

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.

Orford answered 11/5, 2011 at 8:48 Comment(5)
Nice answer, but in my Aptana I only have comments for PyDev... Any shortcuts for comments don't exists :( I have downloaded Aptana from official site - why my IDE hasn't this shortcuts?Dentoid
Have you installed PyDev as a separate plugin? Are you writing PHP files or HTML, or something else?Orford
Yes, PyDev is installed. I don't know how - as separate or something else...Dentoid
For what it's worth, while CTRL-SHIFT-L brings up a list of shortcuts commenting out shortcuts aren't listed (CTRL-SHIFT-/ and CTRL-/). At least, not for PHP.Planetstruck
For anyone asking themselves why command+7 does not work on mac go to preferences->general->keys and select "toggle js comments" and make sure that "Javascript editor scope" is selected!!! This fixed the problem for me.Paradise
S
10

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

Snazzy answered 1/7, 2011 at 13:4 Comment(2)
nice, but i can only click it, they don't work on keyboard :(Dentoid
What version of Aptana Studio are you using, and is on on a foreign-language keyboard? The 3.0.3 release added some extra commands for toggling comments, which may work for you.Snazzy

© 2022 - 2024 — McMap. All rights reserved.