Home Download Buy Blog Forum Support

Indentation rules

Indentation rules

Postby skunkbad on Sun Oct 30, 2011 3:12 am

In /Packages/PHP/ there is a file, "Indentation Rules.tmPreferences" and it has some regex in it that is way too complicated for me to understand. What I'd like to know is if this is the file that controls the indent on a closing parentheses. Currently in PHP, a closing parentheses does not always go back to the place where the line above it starts, and this is super annoying for me. Please help me figure out how to make the closing parenthesis go where I want it. I did buy a license for Sublime Text 2 if it makes a difference. If I must pay extra to make this work the way I want it, let me know.

Code: Select all
// closing parentheses is not in line with line above it
$arr = array(

Code: Select all
// closing parentheses is in line with line above it
$arr = array(
Posts: 13
Joined: Wed Oct 26, 2011 5:30 pm

Re: Indentation rules

Postby rchl on Thu Nov 03, 2011 10:33 pm

I'd hope to be proved wrong but I have a feeling that indentation rules in tmPreferences files are not really used.

I think so because just now I got sick of indentation staying at the same level when pressing enter at the end of block like this:

Code: Select all
if (1)

and wanted to find a way to fix that. I've tried changing Indentation Rules.tmPreferences in C++ bundle but that didn't seem to change anything (another issue is that rules are pretty difficult to understand, even if I know regexp). I've also tried removing file completely but indentation was still working as before, no worse or better.
Posts: 154
Joined: Fri Mar 04, 2011 11:02 pm

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 8 guests