Hi everone.
I recently tried to make ruby folding work all through our rails project and almost succeeded. Typical offenders are p.e. do... end statements in one line (we just use {} now). But I have problems with do... end blocks which directly get a method sent to:
blabla.collect do |whatever| format(whatever) end.join(',')
Here the folding stop working for everything that follows in the document and in this case it's difficult to rewrite the code to make folding work (suggestions highly appreciated). I tried to modify the Ruby language grammar to no avail and it seems that folding should work here:
| (^|;) \s*+ end . .* $
Shouldn't this line within the foldingStopMarkers match? I'm confused and would be grateful for any help.
Regards, Niko.
On 4 Dec 2007, at 12:18, Niko Dittmann wrote:
I recently tried to make ruby folding work all through our rails project and almost succeeded. Typical offenders are p.e. do... end statements in one line (we just use {} now). But I have problems with do... end blocks which directly get a method sent to:
blabla.collect do |whatever| format(whatever) end.join(',')
Here the folding stop working for everything that follows in the document [...]
Could you paste a full example? Duplicating your above snippet 3 times have all 3 folding nicely out-of-the-box (this with the Ruby language grammar, the Rails might not share the same folding patterns).