From The Blog: Featured tool: Corona Plugin for Xcode

Any updates on this fix? Working on code with 8000 lines with numerous comments that don’t close with --]], only ]] makes 8000 lines of code one colour… Not too handy :(.     Close to bailing and going to Sublime, and I’d rather not.

PS: Search and replacing ]] for --]] was disastrous since there were multiple tables like [[I]] - which fell over miserably :slight_smile:

Hi Graham

Sorry I didn’t get to it yet… but here is a quick fix:

Run this command in the terminal:

sed -i -e 's/--]]/]]/g' /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/Corona.xclangspec

After running the command you need to restart Xcode.

Thanks.

Ahh… bliss… that’ll do for now :).  Thanks

When using block Editor/Structure/Toggle comments I’m getting // as comments instead of --. Any advice?

Another thing that I encountered is that Corona api lookup always invokes Safari instead of my default Chrome browser. Otherwise Xcode invokes default browser but not in the case of Corona api lookup.

I am afraid that it isn’t possible to change the toggle comment characters. I didn’t find a way to do it and I see that it doesn’t work for other Xcode supported languages like python, html, and applescript either… so I am pretty sure it is not possible.

Yes I changed it to always use Safari some time ago because of a bug in MacOS 10.12.5.

I think apple fixed the bug in 10.12.6 so if you are using that or later you can change it back like this:

Type in terminal:

open -a Xcode /Users/[your user]/Library/Developer/Xcode/UserData/Behaviors/doc-lookup.cfx.applescript

Now Xcode opens a script file. In that file locate this part:

tell application "Safari"     open location docUrl     activate end tell

and replace + save it with this:

open location docUrl

Now the docs should open in your default browser.

Thanks, Jacob

Thanks Jacob, your tip works great!