<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Textmate's Ruby grammar appears to get confused by the </div></div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font class="Apple-style-span" face="Courier">foo = {</font></div></div><div><div><font class="Apple-style-span" face="Courier">  "bar" => 42</font></div></div><div><div><font class="Apple-style-span" face="Courier">}</font></div></div></blockquote><div><div><br></div><div>but adding a comment after the closing brace throws things off:</div><div><br></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><font class="Apple-style-span" face="Courier">foo = {<br></font><font class="Apple-style-span" face="Courier">  "bar" => 42</font><div><div><font class="Apple-style-span" face="Courier">  } # comment breaks indentation</font></div></div></blockquote><div><br></div><div>I tend to use "Indent Line" (⌥⌘[) quite a bit, and this behaviour makes it pretty hard to easily re-indent nested data structures, e.g.</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font class="Apple-style-span" face="Courier">data = {</font></div></div><div><div><font class="Apple-style-span" face="Courier">  "jim" => {</font></div></div><div><div><font class="Apple-style-span" face="Courier">    "name" => "James Jameson"</font></div></div><div><div><font class="Apple-style-span" face="Courier">    },</font></div></div><div><div><font class="Apple-style-span" face="Courier">    "bob" => {</font></div></div><div><div><font class="Apple-style-span" face="Courier">      "name" => "Robert Robertson"</font></div></div><div><div><font class="Apple-style-span" face="Courier">      },</font></div></div><div><div><font class="Apple-style-span" face="Courier">      "billy" => {</font></div></div><div><div><font class="Apple-style-span" face="Courier">        "name" => "William Williams"</font></div></div><div><div><font class="Apple-style-span" face="Courier">      }</font></div></div><div><div><font class="Apple-style-span" face="Courier">    }</font></div></div></blockquote><div><br></div><div>The problem seems to be limited to Ruby mode; other language grammars (e.g. Java, Javascript) seem to be unaffacted.</div><div><br></div><div>Am I the only one experiencing this?  Any bright ideas?</div><div><br></div><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-family: Helvetica; font-size: 12px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>-- </div><div><div><div><div><div><div><div>cheers, </div><div>Mike Williams</div></div></div></div></div></div></div></div></span></div>
</div>
<br></body></html>