Textmate Upgrades for ActionScript
I was just upgrading Textmate and was looking into a few things that I was shown FDT can do that I didn't know how to do in TextMate and came across a few helpful things.
The most important thing if you dont have it already is the ActionScript 3 bundle. If you have this skip this section. The most updated version always lives here.
svn.textmate.org/trunk/Review/Bundles
You can download this with any SVN client with this url. When you get it on your computer make sure that the name of the folder ends with ".tmbundle"
If so you can just double click this file and it will install.
To get this going you have to open TextMate > Preferences > Advanced > Shell Variables and click the plus button.
Type MXMLC in the variable column and the path to the bin folder of your Flex SDK in the value.
This will enable you to compile from TextMate much like you do with Flex.
This gives you a list of features that you can start to check out by opening File > New From Template > ActionScript 3 > Project
After you get this going and work with it for a while you will see there are some odd things that occasionally happen in the project draw.
To fix this and add all kinds of other features get this. ProjectPlus
The biggest thing it adds for me besides reliability is SCM (source code management) info.
With all this you will be set but one of the things that FDT can do that TextMate was missing was a searchable code browser but this is simply solved with this.
TmCodeBrowser
This has a basic implementation of ActionScript support built in but it is missing a few things. To make it better edit this page here and add this.
With all this you are set, there is more features that you will really need but here is a list of my favorites.
doc ⇥ - Create an ASDoc block
⇧ ⌘ D - Open superclass
From the ActionScript 3 menu, Debug > Install / Edit Debug Player Settings
⇧ ⌘ C - Insert Color
The most important thing if you dont have it already is the ActionScript 3 bundle. If you have this skip this section. The most updated version always lives here.
svn.textmate.org/trunk/Review/Bundles
You can download this with any SVN client with this url. When you get it on your computer make sure that the name of the folder ends with ".tmbundle"
If so you can just double click this file and it will install.
To get this going you have to open TextMate > Preferences > Advanced > Shell Variables and click the plus button.
Type MXMLC in the variable column and the path to the bin folder of your Flex SDK in the value.
This will enable you to compile from TextMate much like you do with Flex.
This gives you a list of features that you can start to check out by opening File > New From Template > ActionScript 3 > Project
After you get this going and work with it for a while you will see there are some odd things that occasionally happen in the project draw.
To fix this and add all kinds of other features get this. ProjectPlus
The biggest thing it adds for me besides reliability is SCM (source code management) info.
With all this you will be set but one of the things that FDT can do that TextMate was missing was a searchable code browser but this is simply solved with this.
TmCodeBrowser
This has a basic implementation of ActionScript support built in but it is missing a few things. To make it better edit this page here and add this.
--langdef=Actionscript
--langmap=Actionscript:.as
--regex-Actionscript=/^[ \t]*[(private| public|static) ( \t)]*function[ \t]+([A-Za-z0-9_]+)[ \t]*\(/\1/f,function,functions/
--regex-Actionscript=/^[ \t]*[(public) ( \t)]*function[ \t]+(set|get) [ \t]+([A-Za-z0-9_]+)[ \t]*\(/\1 \2/p,property,properties/
--regex-Actionscript=/^[ \t]*[(private| public|static) ( \t)]*var[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/v,variable,variables/
--regex-Actionscript=/^[ \t]*[(private| public|static) ( \t)]*const[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/v,constant,constants/
--regex-Actionscript=/.*\.prototype \.([A-Za-z0-9 ]+)=([ \t]?)function( [ \t]?)*\(/\1/ f,function,functions/
--regex-Actionscript=/^[ \t]*class[ \t]+([A-Za-z0-9_]+)[ \t]*/\1/c,class, classes/
With all this you are set, there is more features that you will really need but here is a list of my favorites.
doc ⇥ - Create an ASDoc block
⇧ ⌘ D - Open superclass
From the ActionScript 3 menu, Debug > Install / Edit Debug Player Settings
⇧ ⌘ C - Insert Color
Labels: ActionScript 3, TextMate
