I'm searching for useful Android Studio keyboard shortcut for commenting code, as in Sublime Text or Eclipse.
When I press either
cmd + /
cmd + maj + /
Line Comment hold both: Cmd + /
Block Comment hold all three: Cmd + Alt + /
Line Comment hold both: Cmd + + =
Block Comment hold all three: Cmd + Alt + + =
Issue: on some mac Keyboard, there is not numeric pad so the Android Studio shortcut is not correct.
Fix : edit shortcut to
alt + / or
alt + maj + / for block comment and its working as it should (it's displaying
alt. in the keymap). Note : it will override some Mac shortcuts like the backslash
\) which is already defined on
alt + maj + /.
UPDATE 7/01/2015: on every mac, it seems that Cmd + + = is working perfectly.
Line Comment hold both: Ctrl + /
Block Comment hold all three: Ctrl + Shift + /
Same way to remove the comment block.