Using Sublime text editor in AGS

Started by GMD1984, Mon 03/02/2014 11:32:10

Previous topic - Next topic

GMD1984

Hello, AGSers!
I have been on and off get my hands wet for AGS for a while now. And recently been focusing on game project using AGS. I'm happy with the editor now. But, just one thing I want to know.

Does AGS support an external text editor for game's script editing?
I am quite a SublimeText's bitch who love its beauty dark-chocolate color theme. And I think it would be super if I can plugged AGS with Sublime.

Additional info about sublimeText Editor. -----> http://www.sublimetext.com/http://www.sublimetext.com/


Crimson Wizard

#1
You cannot integrate other editors in AGS, but you can edit the scripts with anything you like, even MS notepad, just you have to launch your editor yourself.

Scripts are files in you project folder named *.ash (header) and *.asc (main source).

GMD1984

Thank you very much Crimson!

It's really was that simple. And works beautifully.

Actually I have another question. Do you have any idea of how can I import AGS's auto-complete, functions/commands guessing into other text editor?

Thanks in advanced.

Wyz

AGS extracts this from the native and plugin script headers which are baked into the editor and plugin DLL's. If you're used to scripting you can do it but it would be a ridiculous amount of work I think ;-D. However if you want to here is a bit of useful information:

You can find the native script header here (source code).

The bits you're looking for will start with import, #define, (managed) struct and enum.

A autocompleter directive starts with three slashes and precedes the import clause. There are two magic words for the import clauses that will have an effect on the autocompleter:
Code: ags
import ...; // $AUTOCOMPLETEIGNORE$

This will hide the function from the big list with suggestions in AGS. If you use the function it will still autocomplete though.
Code: ags
import ...; // $AUTOCOMPLETESTATICONLY$

This will only show in AGS when you are referencing the class instead of the instance. This is used when classes are used as namespaces.
Life is like an adventure without the pixel hunts.

GMD1984

Wow, Thanks for the tip Wyz. It's obviously beyond me for my scripting skill right now. But, Thanks anyway. At least I know better how's Editor works.
Luckily, that my editor have a built-in Guessing/Auto-Complete from context of the codes within a script file. So, It's works for those script files I already started written with significant amount of code.

monkey0506

Quote from: Wyz on Mon 03/02/2014 12:44:53There are two magic words for the import clauses that will have an effect on the autocompleter:

What, no love for $AUTOCOMPLETENOINHERIT$? :P

(Which, by the way, is currently only used AFAIK by the GUIControl class to prevent such confusingly useless members as Button.AsLabel and Slider.AsInvWindow.)

Wyz

Nope. We've been in a hate relationship for years and I refuse to acknowledge its existence. :D
No really thanks for pointing that one out! I completely forgot about it. :D
Life is like an adventure without the pixel hunts.

Snake

Quote from: monkey_05_06 on Tue 04/02/2014 11:15:00
Quote from: Wyz on Mon 03/02/2014 12:44:53There are two magic words for the import clauses that will have an effect on the autocompleter:

What, no love for $AUTOCOMPLETENOINHERIT$? :P

(Which, by the way, is currently only used AFAIK by the GUIControl class to prevent such confusingly useless members as Button.AsLabel and Slider.AsInvWindow.)
Oh.
Your name is Monkey, but you're really such a turkey :-D
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

SMF spam blocked by CleanTalk