[Geany-Users] Ruby indent not working

Thomas Martitz thomas.martitz at student.htw-berlin.de
Thu Jan 17 21:00:19 UTC 2013


Am 17.01.2013 21:28, schrieb Lex Trotman:
> On 17 January 2013 23:02, Sayth Renshaw <flebber.crue at gmail.com> wrote:
>> Hi
>>
>> I just installed geany 1.22 on a windows 7 laptop and I am starting into
>> rails. So I am tinkering with ruby files which I haven't done before.
>>
>> The thing is geany isn't indenting my files.
>>
>> I created a file test.rb and just typed a multi array and printed it to
>> output as a test.
>>
>> However I got no indenting so it looks like.
>>
>> my_array = [[1,0],[2,1],[3,2]]
>>
>> my_array.each do |x|
>> x.each do |y|
>> puts y
>> end
>> end
>>
>> when it should look like.
>>
>> my_array = [[1,0],[2,1],[3,2]]
>>
>> my_array.each do |x|
>> x.each do |y|
>> puts y
>> end
>> end
>>
>> Not sure if I have missed something Ruby specific
> Hi,
>
> Well, sort of, or rather Geany has missed something, Ruby specific
> support for indenting :)
>
> Geany autoindent is almost language independent, it knows how to:
>
> 1. go to the same indent as last line
> 2. indent and unindent on { and }
> 3. as a special case only, indent on : in Python
>
> None of these will work for Ruby IIUC.
>
> What it needs is for someone to specify the algorithm, and to provide
> a plugin that implements it (such language specific stuff shouldn't be
> in core)
>

I disagree.

This is something that ought to be in the core, really. Language support 
is a core feature of Geany (and any IDE). It should work out of the box 
and not reside in disabled-by-default extensions. Especially if python 
can have its special case in the core.

What else, if not language support, belongs to the core? And since when 
is handling/enabling indentation a plugin-thing?

Best regards.


More information about the Users mailing list