lua-users home
lua-l archive

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


Got it working. Thanks :-)

On Sat, Jan 8, 2011 at 3:34 PM, Tom <tom.wieland@gmail.com> wrote:
> On Sat, Jan 8, 2011 at 11:27 PM, beo wulf <beowulf@intamp.com> wrote:
>> I'm using the default lua.vim, ... and indenting seems to work for
>> everything (function/end, do/end, ...) except for multiline function
>> arguments. For example, lua.vim wants to indent
>>
>> foo(
>> a,
>> b,
>> c);
>>
>> whereas, I would prefer the identing to be:
>>
>> foo(
>>  a,
>>  b,
>>  c);
>>
>> Anyone else have this problem? Basicaly, when there's a function call,
>> I'd prefer the args to be indented), whereas lua.vim justifies it to
>> the left with the "f" in function.
>>
>> Thanks!
>>
>>
>
> I think this isn't a Lua question per se but more of a Vim question.
> Your problem lies with the default Vim indentation file for the Lua
> language.
>
> I'm assuming you have in your ~/.vimrc;
>
> filetype plugin indent on
> syntax on
>
> for turning on automatic indentation based on filetype in Vim. I
> recommend you read user guide section 30.3 to 30.5 (:help 30.3) to see
> how automatic indentation works in vim.
>
> The file I'm talking about can be seen by :e
> $VIMRUNTIME/indent/lua.vim. You can change it or make your own (or
> look on the vim.org site for one) and then put it in
> ~/.vim/indent/lua.vim
>
> Cheers,
>
> Tom Wieland
>
>