Multiple line comment in Xcode 8

后端 未结 5 1865
说谎
说谎 2021-02-03 18:51

I just upgraded to Xcode GM 8.0 and noticed ⌘ + / is not commenting out selected lines. Is there another command to comment out multiple lines in Xcode 8?

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-03 19:21

    I finally figured this one out, drove me crazy…

    These are the preconditions for the bug to arise:

    1. '/' needs to be accessed with the shift key, like i.e. on German keyboards.
    2. There is a global OS X hotkey to access help with shift+cmd+'/', which is the default

    Under these preconditions there is not conflict showing in XCode keyboard preferences, but it trying to invoke cmd+'/' triggers the global help hotkey anyway.

    How to fix it?

    Simply remap or switch off the global hotkey to show help in system preferences > keyboard > keyboard shortcuts, select app shortcuts in the list on the left.

提交回复
热议问题