You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Define standard code formats and apply them to current code #32
Indentation - Indenting often uses two spaces. This is followed in Programming in Lua, the Lua Reference Manual, Beginning Lua Programming, and the Lua users wiki. (Why this is the case, I don't know, but perhaps it is because Lua statements can tend to be deeply nested, even in a LISP or functional manner, or perhaps it is affected by the fact that the code in these examples is small and pedagogical.) You'll see other common conventions (e.g. 3-4 spaces or tabs).
2 sp is preferred, also 3 sp / 4 sp are applied, and hard tab is also applied. aggghagghghg
Activity
muojp commentedon Sep 30, 2013
English/日本語 would be ok on this thread.
futoase commentedon Oct 1, 2013
Awesome 😄
futoase commentedon Oct 8, 2013
Luaの場合はどうしましょう?
What's this code format of
Lua?see https://github.com/KLab/PlaygroundOSS/tree/master/Tutorial
Try this product use of https://github.com/LuaDist/luapretty or http://lua-users.org/wiki/SourceCodeFormatter ?
muojp commentedon Oct 8, 2013
In my opinion, we could skip lua code in formatting, because they have lots of "spaces for explanation" such as:
I bet applying code formatter on these code result in ugly styling :(
muojp commentedon Oct 8, 2013
http://lua-users.org/wiki/LuaStyleGuide
2 sp is preferred, also 3 sp / 4 sp are applied, and hard tab is also applied. aggghagghghg
muojp commentedon Oct 8, 2013
"Simply applying 2 sp and modifying comments on line endings to make explanations look better" seems a practical option to me.
futoase commentedon Oct 8, 2013
I understand.
2 space there better?
futoase commentedon Oct 8, 2013
👍