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
Sayth
.
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:
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)
Cheers Lex
Sayth
.
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
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?
Best regards.
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
Le 17/01/2013 22:00, Thomas Martitz a écrit :
Am 17.01.2013 21:28, schrieb Lex Trotman:
On 17 January 2013 23:02, Sayth Renshaw flebber.crue@gmail.com wrote:
Hi
[...]
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.
Nope, I don't think so. Actually I wish we support (someday) "filetype plugins", e.g. a plugin that provides highlighting, tag parsing and any other kind of useful language-specific features. Maybe those plugins should indeed be automagically loaded when opening a file using that plugin's language, but it'd be great if the features where in a separate entity.
Why? Well, there are many reasons:
* It would use less resources: even though each filetype would probably use more resources because of the plugin and loading thingie, nobody uses 100 languages at the same time, nor in the same Geany run.
* Third parties could provide full-featured additional languages. This would be very good, because currently if you want a new lexer (highlighting) or tag parser (symbols) it ought to live in Geany's core. This is not really a problem for C, C++, Java or other popular languages, but this requirement is a pain for less used languages -- honestly, what percentage of Geany uses will use COBOL? Haxe? Verilog? or even Haskell or Erlang? some of course, but few. And I only spoke of languages currently supported by Geany, not all the languages one might want to use but that aren't widespread.
* When something is specialized, it's often better for that particular feature. What I mean is that a plugin that focuses on say, Python support, could provide awesome features that only make sense with Python and no other language. And it'd be easier to Python users to improve the Python-specific plugin rather than having to deal with the whole Geany codebase.
* and probably other things I don't think of right now.
What else, if not language support, belongs to the core? And since when is handling/enabling indentation a plugin-thing?
As said in the other mail, I agree that in the case of indentation there should be a generic thing in Geany (indentation being a common thing for most languages). But in a perfect world, what would belong to the core would be the text edition things, and only the common part for each and every language, e.g. a platform that would make the support of a new language as simple as possible.
But I won't dream, we aren't there (yet) ^^
Regards, Colomban
Am 17.01.2013 23:00, schrieb Colomban Wendling:
Le 17/01/2013 22:00, Thomas Martitz a écrit :
Am 17.01.2013 21:28, schrieb Lex Trotman:
On 17 January 2013 23:02, Sayth Renshaw flebber.crue@gmail.com wrote:
Hi
[...]
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.
Nope, I don't think so. Actually I wish we support (someday) "filetype plugins", e.g. a plugin that provides highlighting, tag parsing and any other kind of useful language-specific features. Maybe those plugins should indeed be automagically loaded when opening a file using that plugin's language, but it'd be great if the features where in a separate entity.
Why? Well, there are many reasons:
- It would use less resources: even though each filetype would probably
use more resources because of the plugin and loading thingie, nobody uses 100 languages at the same time, nor in the same Geany run.
If everything is phased out to plugins it can become a threat to Geany's main goal: Be fast & lightweight. It threatens "fast" calling into a shared library has a performance overhead, and for some things that overhead can become measurable or even noticeable (tag parsing or syntax highlighting are possible candidates). And it threatens lightweight, because the installation size grows significantly. Also, the .so files might be so large (just because they are .so files) that even loading a few uses more RAM than statically linking the code for all file types.
Reducing RAM usage _only_ is not the holy grail, especially in times were RAM is cheap and multi-gigabyte RAM setups are the standard.
Besides, IMO some langauge related stuff should be in the core because it's the most reliable way to provide a consistent experience across filetypes (though still not 100% reliable as we see in this bug report).
Furthermore, IMO, plugins should extend Geany's functionality. I would not consider enabling Ruby indentation as an extension, but rather a bug fix for something that should have worked out of the box since the beginning. In fact, it seems strange to invent a new plugin just for the purpose of fixing a bug in the core.
FWIW, could filetypes.conf provide block delimiters (similar to comment characters)? This would allow to remove the special cases itself out of the core code while still having the actual indentation code in the core.
Best regards.
Ok so if I want ruby indenting in Geany it need to be a plugin.
It seems to me that this comes in scite and wscite from a simple ruby.properties file but I could be wrong as I don't know much about this stuff.
I have put the code for the properties in a pastebin http://pastebin.com/3rh4eEej
Can anyone tell me if these are the correct files that need to be put into a ruby plugin?
Sayth
On Thu, Jan 17, 2013 at 6:42 PM, Sayth Renshaw flebber.crue@gmail.com wrote:
Can anyone tell me if these are the correct files that need to be put into a ruby plugin?
SciTE properties files are for SciTE, not for Scintilla. They have no meaning whatsoever for Geany. Think of a plug-in as a program, not as settings. If you want to make a Ruby indentation plug-in, you have to write a program that interacts with Geany to achieve it. If it was as simple as providing settings, someone would have done it already.
Please just use some other editing software, or put up with having to indent Ruby yourself in Geany.
John
On Fri, Jan 18, 2013 at 11:59 AM, John Yeung gallium.arsenide@gmail.comwrote:
On Thu, Jan 17, 2013 at 6:42 PM, Sayth Renshaw flebber.crue@gmail.com wrote:
Can anyone tell me if these are the correct files that need to be put
into a
ruby plugin?
SciTE properties files are for SciTE, not for Scintilla. They have no meaning whatsoever for Geany. Think of a plug-in as a program, not as settings. If you want to make a Ruby indentation plug-in, you have to write a program that interacts with Geany to achieve it. If it was as simple as providing settings, someone would have done it already.
Currently can use ruby beautifier with geany and the send to selection option to tidy up the ruby code. The plugin is written in Ruby itself. Its rules might provide a guide to adding indentation support to geany.
Its here http://www.arachnoid.com/ruby/rbeautify.rb.html
Please just use some other editing software, or put up with having to indent Ruby yourself in Geany.
Yes that's ok for the short term but it would be good to resolve moving
forward.
Sayth
Mit freundlichen Grüßen, A. Kipsch ------------------------------------------------------------------------ Andreas Kipsch Moltkestraße 41 *D* -12203 Berlin
*Kontakt: *Fon: 030-664 644 42 Mobil: 0176-76470118 Mailto: a.kipsch@kabelmail.de
Am 18.01.2013 02:25, schrieb Sayth Renshaw:
On Fri, Jan 18, 2013 at 11:59 AM, John Yeung <gallium.arsenide@gmail.com mailto:gallium.arsenide@gmail.com> wrote:
On Thu, Jan 17, 2013 at 6:42 PM, Sayth Renshaw <flebber.crue@gmail.com <mailto:flebber.crue@gmail.com>> wrote: > Can anyone tell me if these are the correct files that need to be put into a > ruby plugin? SciTE properties files are for SciTE, not for Scintilla. They have no meaning whatsoever for Geany. Think of a plug-in as a program, not as settings. If you want to make a Ruby indentation plug-in, you have to write a program that interacts with Geany to achieve it. If it was as simple as providing settings, someone would have done it already.
Currently can use ruby beautifier with geany and the send to selection option to tidy up the ruby code. The plugin is written in Ruby itself. Its rules might provide a guide to adding indentation support to geany.
Its here http://www.arachnoid.com/ruby/rbeautify.rb.html
Please just use some other editing software, or put up with having to indent Ruby yourself in Geany.
Yes that's ok for the short term but it would be good to resolve moving forward.
Sayth
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 18 January 2013 09:20, Thomas Martitz thomas.martitz@student.htw-berlin.de wrote:
Am 17.01.2013 23:00, schrieb Colomban Wendling:
Le 17/01/2013 22:00, Thomas Martitz a écrit :
Am 17.01.2013 21:28, schrieb Lex Trotman:
On 17 January 2013 23:02, Sayth Renshaw flebber.crue@gmail.com wrote:
Hi
[...]
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.
Nope, I don't think so. Actually I wish we support (someday) "filetype plugins", e.g. a plugin that provides highlighting, tag parsing and any other kind of useful language-specific features. Maybe those plugins should indeed be automagically loaded when opening a file using that plugin's language, but it'd be great if the features where in a separate entity.
Why? Well, there are many reasons:
- It would use less resources: even though each filetype would probably
use more resources because of the plugin and loading thingie, nobody uses 100 languages at the same time, nor in the same Geany run.
If everything is phased out to plugins it can become a threat to Geany's main goal: Be fast & lightweight. It threatens "fast" calling into a shared library has a performance overhead,
Hi Thomas,
Since we load all plugin dlls with immediate binding to avoid segfaults afterwards there is only the cost of one indirection to call anything in the dll. Thats not really significant.
and for some things that overhead can become measurable or even noticeable (tag parsing or syntax highlighting are possible candidates). And it threatens lightweight, because the installation size grows significantly. Also, the .so files might be so large (just because they are .so files) that even loading a few uses more RAM than statically linking the code for all file types.
That rather depends on the sizes of the plugins, the one Matthew is tinkering with off and on includes all of the Clang C/C++ parser in it :)
Reducing RAM usage _only_ is not the holy grail, especially in times were RAM is cheap and multi-gigabyte RAM setups are the standard.
Besides, IMO some langauge related stuff should be in the core because it's the most reliable way to provide a consistent experience across filetypes (though still not 100% reliable as we see in this bug report).
Unfortunately it tends to become a way of providing an acceptable experience for some filetypes and a poor experience for others that don't match the "norm".
Furthermore, IMO, plugins should extend Geany's functionality. I would not consider enabling Ruby indentation as an extension, but rather a bug fix for something that should have worked out of the box since the beginning. In fact, it seems strange to invent a new plugin just for the purpose of fixing a bug in the core.
There is not and never has been any guarantee that indentation worked for any specific language except Python where someone (before my time) put it in core. Understandable since indentation is *critical* to python code.
FWIW, could filetypes.conf provide block delimiters (similar to comment characters)? This would allow to remove the special cases itself out of the core code while still having the actual indentation code in the core.
See the discussion with Colomban on IRC, many languages don't use "block delimiters" in the sense that say C does, often its the language keywords, "if", "else" etc that trigger indentation, not simply a begin/end pair and unindentations can be even more complex.
Cheers Lex
Best regards.
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Le 17/01/2013 21:28, Lex Trotman a écrit :
On 17 January 2013 23:02, Sayth Renshaw flebber.crue@gmail.com wrote:
Hi
[...]
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)
No, I think that what's needed is a configurable indentation thing, like what Jiří and I somewhat started at different times, but didn't finish for some reasons. I (or somebody else ;)) should get back on that subject and try to get something working for real, Geany's auto-indenting is useless in most non-brace language (but Python as you noted), which is sad.
Cheers, Colomban
On Friday, January 18, 2013, Colomban Wendling wrote:
Le 17/01/2013 21:28, Lex Trotman a écrit :
On 17 January 2013 23:02, Sayth Renshaw <flebber.crue@gmail.comjavascript:;>
wrote:
Hi
[...]
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)
No, I think that what's needed is a configurable indentation thing, like what Jiří and I somewhat started at different times, but didn't finish for some reasons. I (or somebody else ;)) should get back on that subject and try to get something working for real, Geany's auto-indenting is useless in most non-brace language (but Python as you noted), which is sad.
Cheers, Colomban _______________________________________________ Users mailing list Users@lists.geany.org javascript:; https://lists.geany.org/cgi-https://lists.geany.org/cgi-bin/mailman/listinfo/users
https://lists.geany.org/cgi-bin/mailman/listinfo/users
Can I ask a question about this. Geany is based in scintilla I believe so is scite. When geany didn't work I tried the latest scite and it indented perfectly.
Why the difference ?
Sayth
On 18 January 2013 08:46, Sayth Renshaw flebber.crue@gmail.com wrote:
On Friday, January 18, 2013, Colomban Wendling wrote:
Le 17/01/2013 21:28, Lex Trotman a écrit :
On 17 January 2013 23:02, Sayth Renshaw flebber.crue@gmail.com wrote:
Hi
[...]
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)
No, I think that what's needed is a configurable indentation thing, like what Jiří and I somewhat started at different times, but didn't finish for some reasons. I (or somebody else ;)) should get back on that subject and try to get something working for real, Geany's auto-indenting is useless in most non-brace language (but Python as you noted), which is sad.
Cheers, Colomban _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-
Can I ask a question about this. Geany is based in scintilla I believe so is scite. When geany didn't work I tried the latest scite and it indented perfectly.
Why the difference ?
The indenting is in Scite, not Scintilla. Maybe the algorithm from Scite is a place to start.
Cheers Lex
Sayth
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Others have pointed out why Geany can't (for now) indent Ruby for you. If you need better support for Ruby right now, your best bet is probably to try other software. If your needs are modest and you want something small and light, you've already discovered SciTE. If you want more of the IDE luxuries and you're willing to install something bigger, I suggest trying the free Komodo Edit.
John