On 18 January 2013 08:00, Thomas Martitz thomas.martitz@student.htw-berlin.de wrote:
Am 17.01.2013 21:28, schrieb Lex Trotman:
On 17 January 2013 23:02, Sayth Renshaw flebber.crue@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:
- go to the same indent as last line
- indent and unindent on { and }
- 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?
Hi Thomas,
None of the language specifics belong in core, given the ever increasing number of languages it would bloat Geany far too much to include all requested language specific features in core. This would cause a cost that all users must bear, irrespective of what languages they want to use.
There is no reason why language specific plugins should not be distributed with Geany, like Class Builder, HTML Characters and friends.
Your point about enabling is reasonable, but there is nothing from preventing such plugins from being enabled automatically when a file of the specific filetype is opened (filetypes are not loaded until needed, so it just becomes another part of that process using a list (in the filetypes file) of which plugins to enable for this filetype).
The fact that Python indenting is currently built-in is historical and shouldn't be taken as an invitation for more languages to do the same :)
Cheers Lex
Best regards.
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users