Page 2 of 2

Re: Lua IDE

Posted: 09 Feb 2012, 18:08
by gajop
pfft, but can your komodo edit look this cool?
Image

Re: Lua IDE

Posted: 10 Feb 2012, 05:41
by MidKnight
Sure.
Image(image is a link)

Re: Lua IDE

Posted: 10 Feb 2012, 10:35
by Cheesecan
Ah that looks nice MidKnight. How long will it last without a license? Website doesn't say..

Re: Lua IDE

Posted: 10 Feb 2012, 19:23
by zwzsg
Forever!
http://www.sublimetext.com/download wrote:There is no enforced time limit for the evaluation.

Re: Lua IDE

Posted: 10 Feb 2012, 21:55
by Cheesecan
Wow I must be getting old..

Re: Lua IDE

Posted: 21 Mar 2012, 11:39
by PicassoCT
Beherith wrote:
PicassoCT wrote:Wasnt there this tool that autoreloads, parses errorlines in the autolog and jumps to that in notepad++? That with notepad always on top and spring windowed actually is the ide(al) dev enviroment.
WANT!

Have been testin this for the past week! Is sweet as honey for the workflow! Might see a Release this weekend.

Re: Lua IDE

Posted: 11 Apr 2012, 19:25
by quantum
PicassoCT wrote:Wasnt there this tool that autoreloads, parses errorlines in the autolog and jumps to that in notepad++? That with notepad always on top and spring windowed actually is the ide(al) dev enviroment.

Just swayin..
You can use the NppExec plugin to parse errors from Spring or from "luac5.1 -p", the Lua compiler in syntax check mode. It can jump to errors lines too. You'll need to fiddle a bit with the options though.

luac5.1 can be found here.

Re: Lua IDE

Posted: 21 Apr 2012, 06:50
by PicassoCT
Or use this, to parse the infolog in notepad++

http://springfiles.com/spring/tools/satans-bugfixer

Re: Lua IDE

Posted: 03 Jun 2012, 15:26
by gajop
A question to the more experienced devs - how do you refactor lua code?
At least how do you deal with basic things such as renaming functions/methods/fields that span multiple files?

It's probably no surprise, but when you start writing lua for spring, especially if you haven't written much lua in your life, there are many things that you will do wrong.

I have a couple of global utility functions, such as "GetIndex(array, value)", "GetValuesWithName(array, name)", and even stuff more specific to my project, such as "MakeVariablePanel(parent, varType)", and later I've discovered you can prefix function names so you don't pollute the global namespace, by creating stuff like "SCEN_EDIT.MakeVariablePanel(parent, varType)" and so I need to rename those occurrences in many files, which is a bit annoying to do.
Same thing applies to when I decided to move things into the global namespace with my "SCEN_EDIT." prefix instead of having it as a field in many objects.

Also how do you do the try/catch mechanics in lua? I've tried pcall but it seems weird, do you use that?

Re: Lua IDE

Posted: 03 Jun 2012, 16:32
by luckywaldo7
I find a nice way to replace certain text in lots of files to be a nice simple sed (stream editor unix utility) 1-liner.

Code: Select all

sed -i 's/OldText/NewText/g' *.lua
'-i' means it will overwrite the old file (instead of making a new one)
's' means substitute
'OldText' is the text you will find to replace
'NewText' is the new text you replace it with
'g' means global, so it will swap the text for all occurances, not just the first

*.lua is the target (so any files with the lua extension in the current directory)

If you check the manual or google you can expand or change the functionality as needed, like to make it run recursively and such.

Re: Lua IDE

Posted: 03 Jun 2012, 16:44
by zwzsg
In Notepad++ there is a search'n'place in files, either all opened files, or all files with given extension in a given folder and subfolders. It can also be set to accept some regex.

Yes, I use pcall to do try catch.

Re: Lua IDE

Posted: 03 Jun 2012, 21:41
by aegis
I just added Lua support to sublimelint for those of you using Sublime Text 2.

This means inline syntax highlighting, saving you a pesky Spring reload for syntax typos and such.

http://github.com/lunixbochs/sublimelint/

Image

Re: Lua IDE

Posted: 03 Jun 2012, 22:09
by PicassoCT
Would it be possible to write ingame debugger?

I mean.. if you would echo out every value, every second line.. you could reconstruct the programs flow- and watch the values dance, and then ..

Re: Lua IDE

Posted: 04 Jun 2012, 02:06
by gajop
aegis wrote: This means inline syntax highlighting, saving you a pesky Spring reload for syntax typos and such.
Would it be possible to have some sort of semantic parsing as well? F.e writing "Sping.Echo" is not syntactically incorrect, that happens to be a bigger problem for me and is quite a nuisance.

PicassoCT wrote:Would it be possible to write ingame debugger?

I mean.. if you would echo out every value, every second line.. you could reconstruct the programs flow- and watch the values dance, and then ..
Maybe there's a better way to do that?
http://stackoverflow.com/questions/7804 ... bedded-lua suggests you can use some sort of remote debugging of sorts,
http://www.keplerproject.org/remdebug/index.html seems to require a small set of tools already mostly existing in Spring?

Re: Lua IDE

Posted: 04 Jun 2012, 06:49
by knorke
gajop wrote:Would it be possible to have some sort of semantic parsing as well? F.e writing "Sping.Echo" is not syntactically incorrect, that happens to be a bigger problem for me and is quite a nuisance
with notepad++ you can edit the .xml files in plugins\APIs\ and make your own autocomplete lists...
In a similiar way it should be possible to define some new words that get highlighted?

Re: Lua IDE

Posted: 04 Jun 2012, 21:56
by PicassoCT
i can tell some funny stories about notepad++ suggesting typos that i made in coments..

Re: Lua IDE

Posted: 27 Jun 2012, 08:56
by Prominence
notepad++ sure is popular, but it's only for windows :(