ActionScript 3 in Sublime Text 2 - simply refreshing!

Thu Sep 8 02:02:03 2011

I had a really pleasant surprise today when I just happened to stumble upon a great little text editor called Sublime Text. Sublime Text 2 is currently at build version 2111 and is still in its beta stage... but boy is it good. It supports many of the major features that I feel have been sadly lacking from TextMate - i.e. split view coding, rich text input such as Japanese (a big one for me), a minimap, full screen and distraction free views - as well as macros and snippet support of course - and anything else I can think of that I need and use on a daily basis.

To get set up to compile for AS3, first off go download it at the Sublime Text website. Then once it's safely installed and inside your Applications folder (if on a mac), fire it up. At first glance, it actually looks a lot like TextMate, but for me has a bit more appeal.

You will need to add what's called a Build System in order to run the build command mxmlc . To do this, go to Tools > Build System > New Build System... . A new file should open called ' untitled-sublime-build '.

Copy the following json into that file, of course substituting the 'location_of_flex_sdk' for the real location of the sdk...

{
    "cmd": [" location_of_flex_sdk /bin/mxmlc", "$file"],
    "selector": "source.actionscript"
}
and save the file as ActionScript.sublime-build in Library/Application Support/Sublime Text 2/Packages/ActionScript/ .

Quit and restart Sublime. Now, write a little hello world in AS3 (whatever you like) and save it anywhere you like.

Now all that's left is to press command + b and you should see the build take place.

To work in split screen, go to View > Layout and choosing a layout you'd like.

Pretty nice, me thinks. Can't wait to see how this baby is going to turn out. Looks very promising.


← back

Most recent posts

  1. Convert Font Suitcase to TTF in 3 Easy Steps
  2. Rain or Shine - Weather Forecast Available Now!
  3. Getting around Apple's silly rules for iOS 10
  4. Localising App Names for iOS and Android
  5. Today - Powerful To-Do App Now Available on iOS & Android

Search site:

Apps by Ubacoda.com

Click the app icons to see more info


Archives

Categories