lua-users home
lua-l archive

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


Just for fun, i'm ending a indent/lua.vim to indent like
this:
> --Alternative 3:
> if a == 0 then
>   print "a is zero"
>   sign = 0
>  elseif a < 0 then
>   print "a is negative"
>   sign = -1
>  else
>   print "a is positive"
>   sign = 1
> end
>
> --Other alternatives ?
>
> I'm trying to work my way through vim's indenting rules
, and I was
> wondering what people thought. I used to use alternativ
e 2 because it is
> clearer where the end and the if match. But it uses mor
e horizontal space,
> but it seems wierd when there are no elseif/else clause
s:
>
> if a > b then
>     a, b = b, a
> end
> while a < b do
>   a = (a + b) / 2
>   print(a)
> end
>
> I'm kind of drawn to alternative 3, but it means gettin
g vim to
> co-operate. (I don't mean to start a flame-
war about text editors, either.
> I happen to like vim, but it's a very personal thing.)


__________________________________________________________________________
Seleção de Softwares UOL.
10 softwares escolhidos pelo UOL para você e sua família.
http://www.uol.com.br/selecao

Attachment: lua_alt3.vim
Description: Binary data