Xcode 8 syntax highlighting doesn't work

前端 未结 9 645
情歌与酒
情歌与酒 2020-12-25 14:11

The code above has correct syntax highlighting in Xcode 7. It is mix of Obj-C + Swift:

I\'ve updated project to support

9条回答
  •  醉酒成梦
    2020-12-25 14:20

    As others have stated above - if I create a new tab ..or 4 then close the tab that usually does it. Sometimes commenting out a line then immediately uncommenting does the trick as well. I got tired of using several keys to accompolish this and made a simple AppleScript to do it for me.

    Create a Automator 'service' and add this script to it. In System Preferences under Keyboard -> Shortcuts -> Services find your new service and assign it to an empty function key (I used F1) and now you have a 1 key fix!

    on run {input, parameters}
    
    tell application "Xcode"
        activate
        tell application "System Events" to keystroke "t" using command down
        delay (0.5)
        tell application "System Events" to keystroke "w" using command down
        delay (0.5)
        tell application "System Events" to keystroke "/" using command down
        delay (0.5)
        tell application "System Events" to keystroke "/" using command down
        delay (0.5)
    end tell
    
    
    return input
    end run
    

提交回复
热议问题