[TxMt] Re: Ruby hash indentation bug?

Mike Williams mdub at dogbiscuit.org
Wed Jan 4 01:49:11 UTC 2012


On 04/01/2012, at 4:03 AM, Adam Strzelecki wrote:

> Yes, there's little bug in Ruby indention settings, that does not take comment into consideration, go to: Edit Bundles… > Ruby > Settings > Indent and update:
> 
> decreaseIndentPattern = '^\s*([}\]]\s*(\#|$)|(end|rescue|ensure|else|elsif|when)\b)';

Thanks Adam! That almost did the trick.  I actually changed it to:

^\s*([}\]]|(end|rescue|ensure|else|elsif|when)\b)

so that anything after the close-brace is ignored.  Otherwise, the nested-hash example indents badly (due to a comma after the close-brace).

-- 
cheers, 
Mike Williams

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20120104/03080e3b/attachment.html>


More information about the textmate mailing list