Sublime Forum

ActionScript enhancement requests

#1

Just bought a license, thanks for the great text editor. :smile:

Some enhancement requests to the ActionScript parser, from easy to hard:

“|” should be colored the the other operator characters. Valid operators with this character are |, |=, ||, and ||=.

“>” and “<” should be colored as the other operator characters. Valid operators with these characters are <, <<, <=, <<=, >, >>, >=, >>=, >>>, and >>>=.

Toggle comment (Ctrl+Slash) and toggle block comment (Ctrl+Shift+Slash) should be enabled for ActionScript files. It should function exactly the same as it does for JavaScript.

All of the JavaScript snippets are appropriate for ActionScript, with the exception of getElementsByTagName().

ActionScript supports regex literals like JavaScript does.

And finally, the unreasonable-unless-you-can-easily-handle-contextual-grammar:

ActionScript allows XML literals in code. For example:
var xml:XML = Sup!Yeah!;
is valid.

0 Likes

Help with Sublime Text 3 Toggle Comments for Actionscript
#2

Hey, I too use AS3 and love this editor, I bought a license a little over a month ago. have you moved these features into your own custom key bindings? if so would you mind sharing the file? I have not played around with trying to modify them yet but would love to have some key bindings if you don’t mind sharing.

0 Likes

#3

Is there some way of copying whatever is done for javascript files for commenting into some actionscript-related setup or config file to get the ability to use the CTRL-/ and CTRL-Shift-/ working?

0 Likes

#4

OK - I think I answered my own question.

I went to Preferences | Browse Packages and navigated to Javascript | Comments.tmPreferences which I opened with Sublime.

I then changed the lines (pretending that I did it in one try…)
scope
source.js, source.json

to
scope
source.actionscript.2

I didn’t change the uuid entry, but wondered about it.

I then saved the file in the actionscripts folder and I am good to go - without even closing and reopening Sublime.

0 Likes

#5

This is the info I have been looking for to add Actionscript snippets (using the Javascript equivalent).

I was originally using:

source.as

but was not working until I changed to

source.actionscript.2

Not too sure why it is done this way but works, thanks

0 Likes

Help with Sublime Text 3 Toggle Comments for Actionscript
Toggle Comments not working with AS3 on Mac