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:
1 | if (foo==bar){ foo=1; bar=2;}else{trace("WTF?!")} |
Your looking to convert that line to lua ?
if (foo==bar){ foo=1; bar=2;}else{trace("WTF?!")}
1 2 3 | if foo == bar then foo, bar = 1,2 else trace("WTF?!") end ? |
no.. uhm, I'm looking for a tool that can auto-indent lua code
something that can turn this
1 | function foo (bar) if bar == 0 then foobar = 1 end end |
Oh my bad :)
Sorry I don't know of one personally :/
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
One more thing, I tried your code with the IntelliJ IDEA editor
1 | function foo (bar) if bar == 0 then foobar = 1 end end |
@Danny: no problemo :)
@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!
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
Why object pass through a line which is a static physics object
Zoom iPad simulator to actual size
Ball restart velocity and position
What is the bounds field in ui.newLabel
Game Center not on roadmap?
Disable INTERNET permissions?
just cannot get build enabled
unloadMe function in older Director Class
catapult like angry birds