lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Am 05.01.2014 03:53 schröbte Hisham:
On 5 January 2014 00:33, Pierre-Yves Gérardy <pygy79@gmail.com> wrote:
At one point, I naturally came to three spaces for indenting my Lua
code, and it looked quite good.

I didn't know it was the Emacs default, and it somehow felt like
living a dangerous life, away from the familiar powers of two...

I switched to two for my current projects, but it may change again.

I use three spaces in the LuaRocks codebase, and I've seen it used in
other projects as well. It fits nicely in a language with
"end"-terminated blocks.

I prefer two spaces for a similar reason:

    if a >= b and
       b <= c then
      print( b )
    end

Using three spaces misaligns with a wrapped if-condition. Of course I try hard to follow a foreign indentation style if modifying an existing file, that's when I appreciate (bottom) modelines[1].


-- Hisham


Philipp

  [1]: https://bugzilla.wireshark.org/tools/modelines.html