Skip to content

Commit 1d924c5

Browse files
committed
Fix indentation rules
Fixes #247
1 parent 800b988 commit 1d924c5

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Indentation Rules.tmPreferences

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@
1010
<string>^\s*(\}|\]|else|catch|finally|else\s+if\s+\S.*)$</string>
1111
<key>increaseIndentPattern</key>
1212
<string>(?x)
13-
^\s*
14-
(.*class
15-
|[a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)&gt;\s*$)) # function that is not one line
16-
|[a-zA-Z\$_](\w|\$|\.)*\s*(:|=)\s*((if|while)(?!.*?then)|for|$) # assignment using multiline if/while/for
17-
|(if|while|unless)\b(?!.*?then)|(for|switch|when|loop)\b
18-
|(else|try|finally|catch\s+\S.*|else\s+if\s+\S.*)\s*$
19-
|.*[-=]&gt;$
20-
|.*[\{\[]$)</string>
13+
^\s*
14+
( class\b
15+
| [a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)&gt;\s*$)) # function that is not one line
16+
| [a-zA-Z\$_](\w|\$|\.)*\s*(:|=)\s*((if|while)(?!.*?then)|for|$) # assignment using multiline if/while/for
17+
| (if|while|unless)\b(?!.*?then)|(for|switch|when|loop)\b
18+
| (else|try|finally|catch\s+\S.*|else\s+if\s+\S.*)\s*$
19+
| .*[-=]&gt;$
20+
| .*[\{\[]$
21+
)
22+
</string>
2123
</dict>
2224
</dict>
2325
</plist>

0 commit comments

Comments
 (0)