Hi,
the following code behaves a bit strange when in ruby mode:
def to_pdf dictionary_writer({ "Type" => "Pages", "Kids" => @kids, "Count" => @kids.size, "Resources" => @resources, "MediaBox" => @mediabox, }) end
Just select all the text and indent it. The folding markers are at lines 1,2 and 9 (odd number) and the 'end' is indented to the right.
What can I do?
Patrick
On 23/8/2006, at 12:15, Patrick Gundlach wrote:
[...] Just select all the text and indent it. The folding markers are at lines 1,2 and 9 (odd number) and the 'end' is indented to the right.
What can I do?
Either insert a newline after } at line 8 or modify the folding stop marker pattern and decrease indent pattern to not limit recognizing ‘}’ only when it is at the end of the line (or the last thing before a comment) -- probably wouldn’t hurt to change the defaults, I can’t really remember offhand if there was a reason to only accepting it when at the end of the line.
On Aug 23, 2006, at 8:54 AM, Allan Odgaard wrote:
On 23/8/2006, at 12:15, Patrick Gundlach wrote:
[...] Just select all the text and indent it. The folding markers are at lines 1,2 and 9 (odd number) and the 'end' is indented to the right.
What can I do?
Either insert a newline after } at line 8 or modify the folding stop marker pattern and decrease indent pattern to not limit recognizing ‘}’ only when it is at the end of the line (or the last thing before a comment) -- probably wouldn’t hurt to change the defaults, I can’t really remember offhand if there was a reason to only accepting it when at the end of the line.
Check out the new indent rules for javascript. They handle this sort of thing. At least i think i made that work. Right now it just looks like a rats nest :o
{ decreaseIndentPattern = '^(.**/)?\s*(}|))([^{]*{)?([;,]?\s*|.[^ {]*|\s*)[;\s]*)$'; increaseIndentPattern = '^.*({[^}"'']*|([^)"'']*)$'; }
thomas Aylott — subtleGradient — CrazyEgg
Hello Allan,
On 23/8/2006, at 12:15, Patrick Gundlach wrote:
[...] Just select all the text and indent it. The folding markers are at lines 1,2 and 9 (odd number) and the 'end' is indented to the right.
What can I do?
Either insert a newline after } at line 8 or modify the folding stop marker pattern and decrease indent pattern to not limit recognizing ‘}’ only when it is at the end of the line (or the last thing before a comment) -- probably wouldn’t hurt to change the defaults, I can’t really remember offhand if there was a reason to only accepting it when at the end of the line.
[ }) in ruby bundle ]
Thanks for the hint, I have changed both places. BTW: the 'end' statement can also have something behind it, but it still should behave as a folding marker.
Example
...each do |foo| .... end.to_s
Regards,
Patrick