Some things I didn’t know about TextMate and ActionScript 3

I have been using TextMate for a couple years now and I am used to write almost everything by hand. Since AS3 I have been using the AS3 Bundle and mainly it has been to highlight my code and create new documents from the Templates. But I noticed that there are a couple features that might speed up your coding by a bit.

List imported classes

After the “:” you will get a list of the already imported classes that you can use to declare the type of variable you are declaring.

Auto Import classes

If you Hold down Shift+Option+I after highlighting a Class name on your application. The class you are highlighting will be imported at the head of the file. This is helpful because you can keep coding your class and as you are making your declarations you can import the classes necessary for the application.

List class Members

If you type this.[TAB] you will get a list of properties and parameters that are available for that specific class. Useful if you forgot something, but you are a professional so you probably won’t need that.

Insert Color

Ah! You need that color but you don’t remember the hex value for it, no problem just do Shift+Command+C and you will get a color picker component where you can select the color you need and it will insert the hex value into your document. This works for HTML/CSS as well!

Documentation for Selection

My favorite by far! Highlight a word on your application, then key combo control+H and you will get a new window with options to select the right property/method you have selected and you can access the documentation directly. It can’t get easier than that.

Change Document Type

Hold Option+Control+Shift+(Letter for Document Type) and you can change document types rather quickly. When would you need to do so? Well say you are working on a HTML/CSS/PHP (or ASP) project. Now you can use the shortcut to switch document types fast.

Conclusion

There you have it, some shortcuts that might help you speed up the way you code in TextMate, Also remember you can add your own behaviors for a specific language, for example I created couple snipplets that would allow me to navigate up/down between method names (Shift+Command+UpArrow or Shift+Command+DownArrow).

← Back to home