[TxMt] Ruby hash indentation bug?

Mike Williams mdub at dogbiscuit.org
Tue Jan 3 03:56:00 UTC 2012


Textmate's Ruby grammar appears to get confused by the 

foo = {
  "bar" => 42
}

but adding a comment after the closing brace throws things off:

foo = {
  "bar" => 42
  } # comment breaks indentation

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.

data = {
  "jim" => {
    "name" => "James Jameson"
    },
    "bob" => {
      "name" => "Robert Robertson"
      },
      "billy" => {
        "name" => "William Williams"
      }
    }

The problem seems to be limited to Ruby mode; other language grammars (e.g. Java, Javascript) seem to be unaffacted.

Am I the only one experiencing this?  Any bright ideas?

-- 
cheers, 
Mike Williams

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20120103/2a911647/attachment.html>


More information about the textmate mailing list