Page 1 of 2
Lua IDE
Posted: 06 Feb 2012, 16:01
by coreygoestoholl
So, I'm trying to get into the whole "Lua scripting" thing, and I was wondering about IDE's. I've tried a few text editors (vim, gedit), as well as some actual IDE's (
LuaEdit,
Eclipse plug-in). They're all ok, I was just wondering if there was something that worked really well with Spring. More generally, I guess, what does a good scripting workflow look like for Spring? Any suggestions or advice would be appreciated (even if it's just that I should suck it up and use notepad). Thanks!
Re: Lua IDE
Posted: 06 Feb 2012, 16:14
by smoth
I use notepad++
Re: Lua IDE
Posted: 06 Feb 2012, 16:44
by zwzsg
A whole IDE seems overkill. There's no compile, the debug is merely reading infolog.txt, and the documentation is short.
I use
Notepad++ too.
Re: Lua IDE
Posted: 06 Feb 2012, 16:44
by gajop
personally, i don't use IDEs for dynamic typed languages - they tend to just suck (the IDEs, not the languages)
on linux i use vim, tmux (terminal multiplexer similar to screen), grep, and tail if needed
on windows (and that's just really something i avoid, it's really much more suited for C++ and C#), it's just notepad++ and mtail
seeing as you're on linux, if you're familiar with vim it's all about finding a couple of proper plugins (buffer list one is pretty good), and hope you have sane defaults for it like arch linux does
Re: Lua IDE
Posted: 06 Feb 2012, 16:53
by coreygoestoholl
These are helpful, thanks- I'll give notepad++ a shot asap. Debugging isn't really a concern, it's more just that I'd like something that makes dumb syntax errors (forgetting a comma or dropping a quote) obvious. I've spent tons of time searching for code only to find an error like that- not the best feeling in the world.
gajop- My time is actually split pretty evenly between linux and windows (what's available depends on where I am), but I'll look around for some vim plugins. I'll check out the buffer list one especially.
Re: Lua IDE
Posted: 06 Feb 2012, 16:58
by smoth
pfft notepad++ doesn't do that, it just highlights syntax.
As zwzsg said, we run our code in spring.
if you are working on a widget..
start spring
alt-tab
alter code
restore spring
enter key
/luaui reload
for gadget, do the same but
/luarules reload.
Re: Lua IDE
Posted: 06 Feb 2012, 17:01
by Cheesecan
Since lua scripts tend to be pretty simple, spring usually encounters any errors you have sooner or later.. If you crave code completion, try (haven't tried it myself so I can't say if it's good or bad):
http://dustward.com/?p=66
Re: Lua IDE
Posted: 06 Feb 2012, 17:07
by coreygoestoholl
smoth- Is there also a way to reload unitdefs without restarting Spring? That would be really helpful, too.
Cheesecan- Code completion has always seemed kinda gimmicky to me, but I'll take a look. Who knows, maybe it'll be really useful.
Re: Lua IDE
Posted: 06 Feb 2012, 17:11
by smoth
not that I am aware of but zwzsg has some kind of in game stat altering code, he may be able to help you with that.
Re: Lua IDE
Posted: 06 Feb 2012, 17:11
by knorke
I use notepad++
It has has synthax highlighting for Lua and you can have multiple files open in tabs. Which is really all you need for spring lua.
It also does this thing where it shows nested stuff so you can notice missing
ends etc.
If you feel clever you can put infolog.txt in an extra tab/window and use sfhift+F5 to reload it = console, kind of.
More generally, I guess, what does a good scripting workflow look like for Spring?
pro workflow is pro.
http://answers.springlobby.info/questio ... est-my-mod
Also tons of plugins:
http://sourceforge.net/apps/mediawiki/n ... in_Central
Tbh I never tested any of those but at least autocomplete & function/class browser seem usefull. (but for epenis++ I use codeblocks so never really tried)
Re: Lua IDE
Posted: 06 Feb 2012, 17:12
by Cheesecan
Gimmicky? c'mon..if you ever worked with a real language *cough* then you would love it. But with these dynamically typed languages .. meh almost no point to have it since everything is just a lump of chaos.
Re: Lua IDE
Posted: 06 Feb 2012, 17:52
by PicassoCT
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..
Re: Lua IDE
Posted: 06 Feb 2012, 17:55
by Beherith
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!
Re: Lua IDE
Posted: 06 Feb 2012, 18:29
by zwzsg
coreygoestoholl wrote:smoth- Is there also a way to reload unitdefs without restarting Spring? That would be really helpful, too.
There is the /editdefs cheatcode, but I don't really know how it works as I never used it.
smoth wrote:not that I am aware of but zwzsg has some kind of in game stat altering code, he may be able to help you with that.
My code is to edit any stats via a modoption, without modifying the mod, which is an entirely different purpose.
Re: Lua IDE
Posted: 06 Feb 2012, 18:47
by smoth
that can be set to save the changes to a file though...
Re: Lua IDE
Posted: 06 Feb 2012, 19:04
by zwzsg
Yes, but since the defs are edited when loading the gamedata, it won't change them ingame.
Re: Lua IDE
Posted: 06 Feb 2012, 19:33
by PicassoCT
paralllel gamestart in background with new settings, then on-the-fly switch without stitch?
Re: Lua IDE
Posted: 07 Feb 2012, 05:10
by Anarchid
Me, i use geany. Long story short, it's essentially gedit, but with autocompletion and stuff.
Re: Lua IDE
Posted: 07 Feb 2012, 15:16
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!
Actually Satan promised me a AutoIt tool, that would pares the errorline and using the jump of AutoIt would "step" to the same line, and then the next, and next..
Comfort here we come.
Re: Lua IDE
Posted: 09 Feb 2012, 17:59
by CarRepairer
I used notepad++ for years then switched to Komodo Edit. It is more powerful, cleaner and works properly on linux as well as windows.