'phpstorm on osx: shortcut for 'Comment with Line Comment'
seems like i still didn't fully transform into a mac user (coming from Windows), once again having trouble with the keyboard shortcuts:
in phpstorm the following shortcut for 'Comment with Line Comment' is shown in the dropdown menu:
now, problem being, there is no '/' key on my keyboard, typing a slash means pressing 'SHIFT+7' for me.
i already found the keymap options on phpstorm (currently using 'Mac OS X 10.5+) and tried changing the shortcut there but didn't get anywhere so far.
UPDATE 27. Sep. 2018
Just found this blog post, help with the mapping on german mac laptop keyboards: https://victorvolle.wordpress.com/2012/05/16/intellij-german-keyboard-shortcuts-reference/
Also found out that I have a '/' character on the numeric pad part of my german keyboard, an it seems to act like the '/' key on english keyboards, so can use for the 'Comment with line Comment' shortcut
⌘/
Solution 1:[1]
You can use the comment shortcut without editing the keymap. Just press on "=" button, on the right of the ":" button when doing your shorcut.
You can validate this behavior in the keymap editor: pressing the ":" button will show you the "." caracter instead.
But there's still a wrong keyboard mapping.
Solution 2:[2]
damn muricans! wait, JetBrains is located in CZ, damn czechs! ;)
Solution 3:[3]
as mentioned in my comment above, i managed to create my own shortcut by editing the keymap options. the thing i didn't understand in the 'add keyboard shortcut' dialog was that i thought i'm expected to press only one button when the 'First Stroke' textfield has focus.
i'd still be interested though why the default shortcut is something i can't even type on my keyboard?
Solution 4:[4]
I use two tricks to work around what I guess is a bug.
Ctl + Maj + A
, then typing "comment" is enough to choose "Comment with Line comment" with the "Return" key.Using the caps lock, that will let the
Cmd + /
work as expected
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Pierre Marichez |
Solution 2 | ROLO |
Solution 3 | schellmax |
Solution 4 | Heah |