Lua IDE
Moderator: Moderators
-
- Posts: 3
- Joined: 30 Jan 2012, 18:51
Lua IDE
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
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.
I use Notepad++ too.
Re: Lua IDE
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
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
-
- Posts: 3
- Joined: 30 Jan 2012, 18:51
Re: Lua IDE
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.
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
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.
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
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
-
- Posts: 3
- Joined: 30 Jan 2012, 18:51
Re: Lua IDE
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.
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
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
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.
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)
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.
pro workflow is pro.More generally, I guess, what does a good scripting workflow look like for Spring?
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
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
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..
Just swayin..
Re: Lua IDE
WANT!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.
Re: Lua IDE
There is the /editdefs cheatcode, but I don't really know how it works as I never used it.coreygoestoholl wrote:smoth- Is there also a way to reload unitdefs without restarting Spring? That would be really helpful, too.
My code is to edit any stats via a modoption, without modifying the mod, which is an entirely different purpose.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.
Re: Lua IDE
that can be set to save the changes to a file though...
Re: Lua IDE
Yes, but since the defs are edited when loading the gamedata, it won't change them ingame.
Re: Lua IDE
paralllel gamestart in background with new settings, then on-the-fly switch without stitch?
Re: Lua IDE
Me, i use geany. Long story short, it's essentially gedit, but with autocompletion and stuff.
Re: Lua IDE
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..Beherith wrote:WANT!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.
Comfort here we come.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Lua IDE
I used notepad++ for years then switched to Komodo Edit. It is more powerful, cleaner and works properly on linux as well as windows.