Corona Bundle for TextMate

Hi,

If you use TextMate to code your Corona apps, you may be interested in checking out the Corona Bundle for TextMate that I've made available. It basically extends the existing Lua bundle to add support for Corona-specific keywords in autocomplete, as well as a number of snippets for common Corona functions. I'm adding more keywords and snippets as I go along. You can get more info here:

http://www.ludicroussoftware.com/corona/corona-bundle-for-textmate/

Feedback/suggestions are welcome!

Thanks!
Darren

Darren, you are my hero! :)

I have just abandoned Xcode and I am getting used to TextMate, which has some excellent features for code authoring. What intrigued me mostly in TM was the code snippets feature, which I suspected would give a solution for autocompletion in Corona projects.

My intention was to write snippets for commonly used code blocks (such as event handlers) as a generic base which I could then extend with specific-purpose code. However, I am slow at this, as I am learning Lua at the same time :)

Your bundle, is going to help me very much!
I am also going to share whatever useful comes out from my attempts.

Thanks again!

Just to add that command-R is not working here for some reason. I've installed Corona where the tmcommand file also says.

Hi Magenda,

Not sure why it wouldn't be working for you, but in any event I'll be making some changes to that part of the bundle over the weekend. Perhaps the new version will fix the problem you're experiencing.

Thanks,
Darren

Just wanted to give you guys an update. I've been helping out on the TextMate bundle, and you can find my branch here on GitHub:

http://github.com/danro/Corona-SDK.tmbundle

I've reworked the "Run Simulator" command, so that it both launches and reloads the current simulator using a single command.

I am having an issue installing the bundle.

TextMate is not in my Application Support folder (looked in both, no where to be found).

I am currently only using the trial version and would like to know if that is my problem? Not sure what im missing!

Thanks in advance!

If there's no TextMate/Bundles directory in your Application Support directory, you can create those manually. TextMate should pick up any bundles installed in that directory when it starts up.

Thanks,
Darren

Running the simulator does work for me either. I get

Last login: Sun Nov 21 11:40:21 on ttys003
/Applications/CoronaSDK/simulator /Users/rupert/Documents/dev/KeePeeUppy/source
Rupert-Hawkess-Mac-mini:~ rupert$ /Applications/CoronaSDK/simulator /Users/rupert/Documents/dev/KeePeeUppy/source
-bash: /Applications/CoronaSDK/simulator: No such file or directory
Rupert-Hawkess-Mac-mini:~ rupert$

Command-R triggers XCode for me since there is a XCode Bundle provided by TextMate. It appears that the bundles provided by TextMate have higher priority over user supplied ones. I realize I can delete the XCode Bundle but I do not wish to do this yet in case I occasionally use XCode as well. Will need to figure out how to disable a bundle or change order of prioritization. Has anyone been able to resolve this issue? Thanks

Edit - I found a way to Hide a bundle using the Bundle Editor - Filter option and now Command-R triggers the Corona SDK but it just brings the SDK up and does not start the app as its seen in some of the ANSCA demos. Ok, one step at a time.

Hi ksan,

By any chance does the path to your project directory contain a space in it? e.g.

"/path/to/folder/Hello World" ?

It looks like there's a bug in the simulator launch code caused by spaces in the directory names. The easiest fix is to remove the spaces. I'm looking into the bug right now, and will post a fix when I have one.

Thanks,
Darren

Hi Darren,

Thanks for your quick response. You are absolutely right! I did have spaces in there. I tried Command-R on a project that does not have spaces in the path and it worked as expected. Brilliant. Thanks for all your hard work.

Regards,
KS

Has anyone done a Corona extension like this for TextWrangler? If not I might do one. I don't know if TextWrangler does auto-complete and anyway I don't care, but having syntax highlighting for Corona commands would be really helpful.

Just a quick update: I've created a dedicated page for the TextMate bundle where I'm posting news of updates to the bundle, etc.

Latest additions include code colouring - if you've tried it out let me know what you think, or if I missed any keywords that should get the code colouring treatment.

Thanks,
Darren

Hi Everyone,

Just wanted to let you know that I've just finished a whole bunch of updates to the bundle:

  • Updated some of the snippets that were out-of-date due to changes in the Corona SDK.
  • Added a bunch of new snippets, mainly for the media package
  • Started to organize the bundle menu into a set of submenus, grouping snippets by package.
  • Added parentheses to many of the functions in the completions list if the function does not take any arguments (e.g. the completion is now 'stopTuner()' instead of 'stopTuner', so you don't have to type those parentheses anymore).
  • Sorted the completion list alphabetically, and put full package paths at the end of the completion list.

As I mentioned earlier, visit this page for all the bundle info you could possibly want.

Thanks,
Darren

Thanks a lot Darren. This bundle is great. Much appreciated.

It appears there might be a naming issue with the Simulator path.... I had to move the last version I pulled from Anscamobile from the .243 directory to the path specified within the bundle (or vice versa) /Applications/CoronaSDK/simulator

That's right. At the moment, the bundle doesn't support setting an environment variable for the SDK path. It's on the to-do list, though.

Darren

Sorry for the newbie question but would it be complex to port this over to textwrangler? Are they sufficiently different programs that this would not be possible?
thanks!

@txmarsh: no idea, as I don't know what kind of bundle (or whatever it might be called) support TextWrangler has. The TextMate bundle is open source, so feel free to grab it from GitHub and give it a try.

Thanks,
Darren

Hey txmarsh.

I don't use textwrangler, but the link here says it supports syntax highlighting. Maybe that is what you want?

http://lua-users.org/wiki/LuaEditorSupport (scroll about 1/2 down page)

Cheers,

Peter

Hi All,

I've added some very simple templates and snippets for the various audio methods to the bundle. Slightly more detail here.

Thanks,
Darren

Cool. Thanks again Darren.

I am trying to use the Check Syntax button in your bundle and it gives an error that it can't locate luac. I can't either, and I'm wondering if that is something I have to install separately.

Thanks,
Adrian

Where I pick which bundle I want to use, I can't see the Corona SDK, but in the Action menu I do, so I can never use any ESC code completion, any ideas ?

I did install the Textmate Lua bundle, but I have since removed it, but Lua is still there.

Not understanding, anyone ?

Hey everyone,

Just added a bunch of new stuff to the bundle. Check out this page for the details:

www.ludicroussoftware.com/corona-textmate-bundle#29July2011

Thanks!
Darren

Hi again,

If you install the SDK to a non-default location, or need to run multiple versions of the SDK, you can now specify the location of the SDK on a per-project basis and the 'Run in Simulator' command will pick up that setting. Grab the latest version of the bundle, and check out this blog post explaining how to set it up:

http://www.ludicroussoftware.com/blog/2011/08/03/custom-corona-sdk-locations-for-textmate-bundle/

Thanks,
Darren

views:2255 update:2011/9/19 13:40:57
corona forums © 2003-2011