Official Corona SDK Sublime Text plugin

Hi all.

I’ve installed the corona plugin for sublime text, and it’s wonderful!

However, when I press F1 to load the relevant docs page, the behaviour is inconsistent, and usually doesn’t work (I’m using Windows 7, by the way).

For example, when I hit F1 on “close” in the following line of code,

 io.close(fileDest)

my browser loads up this page correctly:

http://docs.coronalabs.com/api/library/io/close.html

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 page simply says the following:

Not Found

The requested URL /api/library/fileDest=io/open.html was not found on this server.

Apache/2.2.22 Server at docs.coronalabs.com Port 80

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

Can anyone help?

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.

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.