[TxMt] Re: Change java indent?

jamiesmithnc nabble at jamieandamy.com
Mon Aug 13 12:12:59 UTC 2012



Allan Odgaard-4 wrote:
> 
> On Aug 9, 2012, at 3:36 PM, jamiesmithnc wrote:
> 
>> I have some java code that won't indent properly, and I would like to
>> update the syntax so it correctly identifies the end brace.
>> 
>> Simplified code looks like this: […] Where/how might I be able to fix
>> this?
> 
> I don’t know if your code made it to this list with messed up indent, if
> not, I think you are asking for too much, as the indent looked pretty
> weird ;)
> 
> If however you are able to determine line-by-line wether indent should be
> increase or decrease (or increased only for the following line) then there
> is hope.
> 
> The system is documented here:
> http://manual.macromates.com/en/appendix#indentation_rules
> 

That link is exactly what I needed, thank you.  I was looking in the wrong
place.

I changed my decreaseIndentPattern to be:

decreaseIndentPattern =
'^(.*\*/)?\s*\}([^}{"'']*\{)?[;\s]*(//.*|/\*.*\*/\s*)?$|^\s*(public|private|protected):\s*$|\}.execute\(\);';

And that did the trick.
-- 
View this message in context: http://old.nabble.com/Change-java-indent--tp34273612p34290220.html
Sent from the textmate users mailing list archive at Nabble.com.



More information about the textmate mailing list