I hope you will find it useful. Even though there are not many people coding in plain galaxy. I believe that's because of lack a proper IDE - maybe this plugin will help with that.
In the future i might add complete validation of the galaxy script with its includes to report various problems - type checking, unused symbols etc.
Also mapping symbols from the project so it can provide better auto completions.
This package is already capable of parsing code into an AST. But it doesn't do anything with it yet..
Very nice! This will be handy for those times I need to do raw galaxy, been meaning to give sublime a spin (notepad plus plus just won't let me go).
As for why people do not code in raw galaxy: Most people using the editor are frankly not coders, they are game designers and learn just enough to get the job done. Combined with the fact that GUI gives a ton of user friendly frontends to many things (Hint text for function comments, Grammar to formulate function calls into more intuitive sentences). Further more, the GUI can automate a fair number of things because it can keep you safe with various restructions (range limits on function calls, to prohibit you from accidentally using a parameter with a value outside a range), and also it can use various preprocessor macros to autogenerate a lot of boilerplate script (if else, switch, loops, etc.).
This isn't to detract from what you've done, I'm mostly just explaining why you see almost no one code in raw galaxy, and even those who do, do it sparingly. If I had to make a terrible analogy, it is like using this vs Visual Studio. Sure, you can and often do write code in sublime, but certain aspects of an an IDE make it hard to ignore, and for large scale game development like this, well, raw coding isn't usually valued, only used when needed.
Yes, i'm aware that majority of mappers are just people unfamiliar with programming, nor needing it for anything as trigger editor serves them in every aspect.
However, there are also people that work with code on daily basis - to that group i refered. Despite their familiarity with programming, it's simply hard to setup proper workflow to work with Galaxy code. There's no IDE.. projects like Andromeda and Galaxy++ are dead. You are simply left without much choice and go on implementing things via GUI.
Trigger editor despite being convenient in many ways will always be inferior for certain group of people. Who find pure code easier to read and write. Even though Galaxy language is lacking in many ways..
Quote:
range limits on function calls, to prohibit you from accidentally using a parameter with a value outside a range
Actually, that's one of the features i would like to add to this plugin. Type hinting for native calls and constants (via tooltips), auto completion with type checking and respecting scope of the presets - i.e. for native `UnitTestState` i will want it to limit completions to c_unitState* constants.
Though, there are indeed many more areas in which auto completion should be smarter/more interactive. But that's certainly possible to get done.
Quote:
it can use various preprocessor macros to autogenerate a lot of boilerplate script (if else, switch, loops, etc.).
For sublime, this is where snippets kicks in. And overall sublime has a lot to offer to speed up coding as a process. Especially with third party packages.
The analogy to Visual Studio is indeed a bit misguided :) This plugin is meant to serve as an addition, replace/extend only one of the components - trigger editor. The whole environment is still based around SC2 editor.
I used to map mod a LONG time ago (2010?) and started trying to get back into it.. This was my first question, "Is there a sublime plugin?", funny it just released like 20 days ago. I'll be using it, thanks!
Wow, why do I only see this now? This is amazing! You should really add it to the package manager.
I've been coding in Galaxy almost right from the beginning. It just seems so much faster and cleaner to me (if you have some coding experience). I've also been using Sublime Text most of the time, but just in normal C language mode, which can be annoying sometimes. I even thought about creating some addon like yours on my own, but never found the time for it. Now I don't have to anymore :)
Took me a while to have it installed, but it works! Thanks so much for this really helpful and awesome tool! [P.S. you might wanna put it in Third-Party tools section]
The only problem is, how do I get the syntax checking to work?
Also, is it possible to add support for /* comment */ comments, + + increment, and defining variables anywhere in the function, when saving the .galaxy file? I think it'll be pretty helpful.
subl-sc2-galaxy
It's a plugin for sublime text editor that introduces support for galaxy script. More informations at its github page.
https://github.com/Talv/subl-sc2-galaxy
Currently features
Screenshots
I hope you will find it useful. Even though there are not many people coding in plain galaxy. I believe that's because of lack a proper IDE - maybe this plugin will help with that.
In the future i might add complete validation of the galaxy script with its includes to report various problems - type checking, unused symbols etc.
Also mapping symbols from the project so it can provide better auto completions.
This package is already capable of parsing code into an AST. But it doesn't do anything with it yet..
Hey, that's super slick, thanks! I don't write in Galaxy (yet), but I've installed the package. You should consider adding it to Package Control, too!
@SomeoneTookMyNameTT: Go
Very nice! This will be handy for those times I need to do raw galaxy, been meaning to give sublime a spin (notepad plus plus just won't let me go).
As for why people do not code in raw galaxy: Most people using the editor are frankly not coders, they are game designers and learn just enough to get the job done. Combined with the fact that GUI gives a ton of user friendly frontends to many things (Hint text for function comments, Grammar to formulate function calls into more intuitive sentences). Further more, the GUI can automate a fair number of things because it can keep you safe with various restructions (range limits on function calls, to prohibit you from accidentally using a parameter with a value outside a range), and also it can use various preprocessor macros to autogenerate a lot of boilerplate script (if else, switch, loops, etc.).
This isn't to detract from what you've done, I'm mostly just explaining why you see almost no one code in raw galaxy, and even those who do, do it sparingly. If I had to make a terrible analogy, it is like using this vs Visual Studio. Sure, you can and often do write code in sublime, but certain aspects of an an IDE make it hard to ignore, and for large scale game development like this, well, raw coding isn't usually valued, only used when needed.
Thanks for feedback guys.
@LucidIguana: Go
Yes, i plan to get it into Package Control at some point.
@ArcaneDurandel: Go
Yes, i'm aware that majority of mappers are just people unfamiliar with programming, nor needing it for anything as trigger editor serves them in every aspect.
However, there are also people that work with code on daily basis - to that group i refered. Despite their familiarity with programming, it's simply hard to setup proper workflow to work with Galaxy code. There's no IDE.. projects like Andromeda and Galaxy++ are dead. You are simply left without much choice and go on implementing things via GUI.
Trigger editor despite being convenient in many ways will always be inferior for certain group of people. Who find pure code easier to read and write. Even though Galaxy language is lacking in many ways..
Actually, that's one of the features i would like to add to this plugin. Type hinting for native calls and constants (via tooltips), auto completion with type checking and respecting scope of the presets - i.e. for native `UnitTestState` i will want it to limit completions to c_unitState* constants.
Though, there are indeed many more areas in which auto completion should be smarter/more interactive. But that's certainly possible to get done.
For sublime, this is where snippets kicks in. And overall sublime has a lot to offer to speed up coding as a process. Especially with third party packages.
The analogy to Visual Studio is indeed a bit misguided :) This plugin is meant to serve as an addition, replace/extend only one of the components - trigger editor. The whole environment is still based around SC2 editor.
I used to map mod a LONG time ago (2010?) and started trying to get back into it.. This was my first question, "Is there a sublime plugin?", funny it just released like 20 days ago. I'll be using it, thanks!
Thanks for this plugin! It's awesome.
I can't get the linter to work though. Is there anything special I'm supposed to do to enable it? Linter works for other languages, just not galaxy
@TTay24: Go
Linter is separated to another package, called nectan which requires python to work. Did you install it as it's mentioned in README?
If you have it installed and it still doesn't work, check whether it got correctly added to your PATH. Linter should by accessible from cli by calling
Just wanted to drop by and say using this now, thanks again.
Wow, why do I only see this now? This is amazing! You should really add it to the package manager.
I've been coding in Galaxy almost right from the beginning. It just seems so much faster and cleaner to me (if you have some coding experience). I've also been using Sublime Text most of the time, but just in normal C language mode, which can be annoying sometimes. I even thought about creating some addon like yours on my own, but never found the time for it. Now I don't have to anymore :)
Took me a while to have it installed, but it works! Thanks so much for this really helpful and awesome tool! [P.S. you might wanna put it in Third-Party tools section]
The only problem is, how do I get the syntax checking to work?
Also, is it possible to add support for /* comment */ comments, + + increment, and defining variables anywhere in the function, when saving the .galaxy file? I think it'll be pretty helpful.