New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax highlighting doesn't work outside class scope #3
Comments
@Pitru Can you give me an example file? |
|
In ActionScript 3.0, every object is defined by a class. If you aren't defining a class (with or without a package) then I suggest you switch to the included ActionScript plugin to have syntax highlighting for your non classed functions. |
For e.x: I have some initialization function, that I use in almost every project, like
and so on. I can't use class for this, its just some lines of code. I could use build-in AS2 plugin for this, but is there way to automatically enable included plugin for this file, and keep yours plugin for everything else? |
I think this depends on your text editor of choice. I'm using Sublime Text 3 and I have the ability to set the syntax on a per file basis. I'm curious how you're setting up your projects if you aren't using classes for your initialization functions. |
I just |
I'd recommend writing some utility classes that you can reuse in all your projects, a la: package com.pitru.utils {
public class StringUtils {
public static function foobar( $string:String ):String
{
// manipulate $string and then...
return $string;
}
}
} |
I've recently encountered the exact same issue. |
For ex. for global functions or variables.
The text was updated successfully, but these errors were encountered: