Previously using ( ⌘ + / ) to comment a block is not working anymore...
XCode 14.0 comment shortcut not working anymore
For some (unknown) reason, it has been changed to ⌘ + ;
You can revert it back by changing in Xcode preferences.
It depends on your keyboard layout : for Italian keyboard it is ⌘ + ´ may be linked to the position of a key on US keyboard ?
In my case ⌘+/ show the help Menu although I changed the shortcut for this case, anyone more with this case?
I can confirm that for italian keyboards it's ⌘ + ´, which is usually used in the rest of MacOs for switching between windows of the same app (except for Finder, which has been recently changed for no reason to ⌘ + <, making it cumbersome and unusable). This is so dumb I can't even comment (and I am not referring to code comments..)
I had the same problem after I installed Xcode 14.0. On my swiss keyboard /
is obtained with the combination ⇧7
.
I fixed it thus
- in the new Ventura
System Settings - Keyboard - Keyboard Shortcuts - App Shortcuts
I uncheckedAll Applications - Show Help menu
, no big loss since I can access it from the toolbar Xcode - Settings - Keyboard Bindings
, the checkboxAdapt to current keyboard
was checked, and I left it checked- in
Xcode - Settings - Keyboard Bindings - Editor Menu for Source Code
I selectedStructure - Comment Selection
and recorded the combination⇧⌘7
- the recorded combination is displayed as
⇧⌘/
- now the block comment toggle works in my Xcode editor
Crosscheck
- I went back to the first step above, and checked
All Applications - Show Help menu
; this overrode immediately my settings in Xcode, so I left it unchecked.
HTH
That's worked for me! Thanks @rudifa!
Thanks @rudifa! That's worked for me Xcode 14.2.
(⌘ + ß) works for me -> German keyboard
In my case, it was because I had the Comment Here Xcode Extension installed, which I'd set up to handle comments through Comment Here > Toggle Comments (Editor Menu for Source Code)
instead of the usual Xcode action, Structure > Comment Selection (Editor Menu for Source Code)
. It appears it had lost permissions following an Xcode update.
I granted it permissions again through System Settings > Privacy & Security > Others > Extensions > Xcode Source Editor
: