Official Corona SDK Sublime Text plugin

Okay, super awesome that this is supported now. The hack method was really tiresome.

However, CMD+B definitely does not work on my installation; while it does start Corona (same as my previous method), each use of CMD+B starts a new instance of Corona. Is single-instance exclusive to ST3 or is this perhaps an issue with OSX?

I’m trying to figure out a good solution to the build problem.  On MacOSX right now, it only starts one Simulator but the console output doesn’t appear in Sublime’s build output window so it’s one step forward, one step back (on Windows you still get multiple Simulators).  I’ll likely have to make changes to the Simulator itself to get this working properly.

Thanks, c0ppo, for the information!

I’m pretty new to Sublime.  Can someone tell me when using this plugin do I have to redownload it every time an update is released?  Or is the latest version always loaded when Sublime starts up?

@Perry

Thats strange because that is not what is happening on my mac.

I get multiple instances of the corona simulator when pressing cmd+B,

but the corona console output appears in sublime in the build results window.

I don’t mind cmd+b creating multiple instances, because I only press it once when I want to launch 

corona. My solution is that i put the “save all” command on a keyboard shortcut (cmd+enter) and set the corona simulator preferences to always relaunch when project is modified.

Works perfect for me!

Is there a way to get all the functions sorted alphabetically inside a lua ?

ubj3d: not that I’ve heard of.

ojnab: I think he was saying that the fix he had in mind had that side effect (single window, but no output). Because (as you might have guessed) I have the same problem of output appears, but every CTRL+B triggers a new window.

Your personal solution is interesting but a) requires a new shortcut and b) doesn’t solve the core problem for anyone except users willing to go in and make a custom, platform specific change. The goal here is really to make it user friendly for everyone. :slight_smile:

I have no problem with multiple instances of Corona Simulator. CMD+S = reloads simulator. Like that i don’t have to run CS again. But sure, it would be even nicer if this issue is solved for those in need of a fix.

Far as I’m concerned - I’m finally happy like a little kid who got his chocolate. SublimeText3 is the most powerful editor out there. It’s cross platform, customisable, etc. And can look quite pretty as well. My installation looks beautiful and settings are synced via dropbox for 3 computers I use. Brilliant little editor!

@richard9

yes I misread Perry’s post a little bit. 

Well I just don’t see the problem. 

Coronalabs can configure shortcuts in their sublime plugin package.

So why not just do a new shortcut for launch corona simulator ( which is calling “build” )

then they could put the “save all” shortcut on cmd+b.

Yes, it’s a clumsy workaround but the result is the same. 

Hey, I can’t seem to find that file… I’m not really familiar with Sublime, can you point me in the right direction?

But when I hit F1 on “open” in the following,

  local fileDest=io.open(pathDest,“wb”)

my browser goes to this page:
http://docs.coronalabs.com/api/library/fileDest=io/open.html

This should be fixed in the latest release which Sublime Text will download next time you restart it.

If you’re using Sublime Text 3, it’s really buried (everything is a ZIP file now which I think spoils customizability a bit).  You’ll find some brief guidance at the bottom of this page http://www.sublimetext.com/docs/3/packages.html

The good news is that I fix for this which will be available soon.

Not 100% sure what you’re looking for but if you hit Super+R (“Super” means “Control” on Windows, “Command” on MacOSX) you’ll get a list of all the functions in the current file.  They’re in order of definition though.

Glad you’ve got the workaround to work well.  The new behavior (one Simulator, no output) will likely appear for you if you restart Sublime and Package Control loads the latest version.

Still getting the weird dot problem.

if I type display.new and select display.newCircle, I get display.display.newCircle

:frowning:

I’m on a Mac

Same thing here. Mac version also.

Cool, it seems to be working nicely now!

Thanks!

@Perry

I have a feature request. I would really like to have the shortcuts from the Corona Simulator transferred to Sublime.

So we could have “Show Project Sandbox”, “Build” (iOS/Android), “Refresh”, “Suspend”, “View As”, “Bring All to Front” etc.

on shortcuts in Sublime.

This would be an easy task to setup yourself if Sublime supported user scripting with applescript ( like pre Xcode 4 used to do ).

I am not really familiar with Python but I think it would be possible to do with this python applescript bridge: https://pypi.python.org/pypi/py-applescript/

…or maybe it could be done some other way, since you can make changes to the simulator itself?

I’m working on completions but haven’t got anything wrapped up and tested for release yet.  I’ll post when I do.

On OSX, I installed the corona plugin for Sublime Text 2.  I get one simulator, but no console output , other than "[Finished in 0.2s] "

Maybe I’m confused, but how is this even usable for development without console output?  Is there a way to enable it? Previously I had Sublime working fine (one simulator, console output working) using an older corona plugin.