I worked a lot with flash actionscript and one of the most helpful IDE-function is the auto-indent button. One click and the code is parsed for syntax errors and formatted by an editable set of rules.
so this line:
if (foo==bar){ foo=1; bar=2;}else{trace("WTF?!")}
would end up like this:
if (foo == bar){
foo = 1;
bar = 2;
} else {
trace( "WTF?!" )
}
I need this for LUA code!
Especially indenting in complex code can be very confusing:
“now, where does this ‘end’ belong to?!”
This afternoon I tried a lot of stuff* but nothing worked satisfyingly.
any suggestions?
no… uhm, I’m looking for a tool that can auto-indent lua code
something that can turn this
function foo (bar) if bar == 0 then foobar = 1 end end
to this
function foo (bar)
if bar == 0 then
foobar = 1
end
end
automatically by a set of rules.
I wish Corona Project Manager CPM could do this, but the indenting there is not optimal - autocomplete rocks, tho!
-finefin
The best editor I’ve found available for free is IntelliJ IDEA editor with the LUA plugin. http://www.jetbrains.com/idea/
It has many great features including a ‘code reformat’ function that makes your code look great.
Jeff
[import]uid: 14119 topic_id: 21411 reply_id: 84838[/import]
@HabitatSoftware: looks promising. will take a look. thanks!
-finefin
EDIT: OH YEAH! IntelliJ IDEA is a nice one!
by copy/pasting chunks of code, my functions become nicely indented. it doesn’t split up my one-line-code, but at least it indents beautifully. thanks again! [import]uid: 70635 topic_id: 21411 reply_id: 84909[/import]