Official Corona SDK Sublime Text plugin

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.  

Interesting idea … where in Sublime Text would you see these commands appearing?

I apologize for breaking console output, I got focussed on preventing multiple instances of the Simulator starting with each new “build” and didn’t notice my “solution” caused console output to get lost.  Fixing the issue for real is a bigger job than just Sublime Text scripting but it’s coming along nicely on both Windows and MacOSX.

In the meantime, you can return to the old behavior on MacOSX (console output but a new Simulator every time you hit Cmd+B ) by editing the file:

~/Library/Application Support/Sublime Text 2/Packages/Corona Editor/Corona SDK.sublime-build

and changing the “cmd” entry in the “osx” section to be:

"cmd": ["/Applications/CoronaSDK/Corona Simulator.app/Contents/MacOS/Corona Simulator", "$file\_path/main.lua"],

If you combine that with the Simulator’s “Reload project when files change” preference you can just use “Cmd+S” to trigger a reload of the project.

Thanks for the temp fix, Perry.  Come to think of it, the old corona plugin I used with sublime also spawned new simulator windows with each Cmd+B.  I got used to the Cmd+S reload so didn’t run into the multiple simulator window issue much.  Glad to hear you have a better solution in the works, though.

-Stephen

Thanks, I fixed it… <3 workflow

Hmm. May have to drop using this plugin, at least temporarily:

With the old, unofficial stuff I could type things like “setRef” and get the “setReferencePoint()” autocomplete. Now I only get “sign:setReferencePoint()” unless I type out the entire “setReferencePoint”, in which case it autocompletes as is without the ().

My guess is that the plugin is unable to recognize or work with table objects, such as “myBox.outer”, whereas it probably works fine with “outer” itself.  If you guys can fix this, that would be great. In the meantime it’s just too much typing.

EDIT: Yeah, none of the commands work with table objects. Yikes. Hope this can be solved. :slight_smile:

The URL is clearly wrong, with the addition of “fileDest=”.

The is issue is that the plugin is looking for a space to start the lookup when it should recognize the ‘=’ as a separator too.  I’ll fix it.

Is it just me or when I type something like:  “display.” none of the functions pop up?  For instance if I type “display.newCir” I don’t get the autocomplete for newCircle.    It does, however, show if I type “disp”

Also, I had to modify “Corona SDK.sublime-build” in Packages to point to C:\Program Files (x86).   It was originally set up to point to C:\Program Files\

Can someone tell me where the official Corona SDK plugin for SublimeText is located?

thegdog, install this on sublime:

https://sublime.wbond.net/installation

Then just press cmd (or crtl if on windows) + shift + p, type install, then search for corona. Install will complete in 2secs :slight_smile:

I noticed that this morning … we’re trying to make sure that the Alt-Left-Arrow and Alt-Right-Arrow work correctly with regard to periods and this clashes with making periods work correctly in completions.  I hope to have a fix soon.

Thanks for the heads up … I’ll see what we can do to make this happen automatically.