-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathIndentation.tmPreferences
40 lines (40 loc) · 1.5 KB
/
Indentation.tmPreferences
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Indent Patterns</string>
<key>scope</key>
<string>text.html.idoc</string>
<key>settings</key>
<dict>
<!-- Combined decrease-indent pattern for HTML and IdocScript (tested in ST2) -->
<key>decreaseIndentPattern</key>
<string>(?x)
^\s*
(</(?!html)
[A-Za-z0-9]+\b[^>]*>
|-->
|<\?(php)?\s+(else(if)?|end(if|for(each)?|while))
|\}
)
|
(^([^(<\$)])*(<\$\s*(end(if|loop)|else(if)?)\s*|<@\s*end\s*@>).*$)
</string>
<!-- Combined increase-indent pattern for HTML and IdocScript (tested in ST2) -->
<key>increaseIndentPattern</key>
<string>(?x)
^\s*
<(?!\?|area|base|br|col|frame|hr|html|img|input|link|meta|param|body|[^>]*/>)
([A-Za-z0-9]+)(?=\s|>)\b[^>]*>(?!.*</\1>)
|<!--(?!.*-->)
|<\?php.+?\b(if|else(?:if)?|for(?:each)?|while)\b.*:(?!.*end\1)
|\{[^}"']*$
|
(^.*(\b(if|loop|loopwhile|else|elseif)(?!.*end(if|loop))|@\s*(dynamichtml|table)\b(?!.*end\s*@)).*$)
</string>
</dict>
<key>uuid</key>
<string>b1b3a75e-8ab2-46a5-aa13-c6b5b24fe6a5</string>
</dict>
</plist>