forked from SublimeText/CoffeeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndentation Rules.tmPreferences
More file actions
25 lines (25 loc) · 936 Bytes
/
Copy pathIndentation Rules.tmPreferences
File metadata and controls
25 lines (25 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.coffee</string>
<key>settings</key>
<dict>
<key>decreaseIndentPattern</key>
<string>^\s*(\}|\]|else|catch|finally|else\s+if\s+\S.*)$</string>
<key>increaseIndentPattern</key>
<string>(?x)
^\s*
( .*\bclass\b(?!\s*:) # class keyword without colon after it (otherwise we are in object with property name "class")
| [a-zA-Z\$_](\w|\$|:|\.)*\s*(?=\:(\s*\(.*\))?\s*((=|-)>\s*$)) # function that is not one line
| [a-zA-Z\$_](\w|\$|\.)*\s*(:|=)\s*((if|while)(?!.*?then)|for|$) # assignment using multiline if/while/for
| (if|while|unless)\b(?!.*?then)|(for|switch|when|loop)\b
| (else|try|finally|catch\s+\S.*|else\s+if\s+\S.*)\s*$
| .*[-=]>$
| .*[\{\[]$
)
</string>
</dict>
</dict>
</plist>