|
2 | 2 | <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
3 | 3 | <plist version="1.0"> |
4 | 4 | <dict> |
5 | | - <key>scope</key> |
6 | | - <string>(source.regexp, source.yaml.sublime.syntax meta.expect-regexp) - comment</string> |
7 | | - <key>settings</key> |
8 | | - <dict> |
9 | | - <key>comment</key> |
10 | | - <string> |
11 | | - Indent any unclosed groups - open parens that don't have a corresponding closing paren on the same line. |
12 | | - Unindent any closed groups - close parens that don't have a corresponding opening paren on the same line. |
13 | | - Also apply to the `expect-regexp` meta scope, because otherwise a line like `- match: (?=\))` in a `.sublime-syntax` file would not have these rules applied to it because the `source.regexp` scope (correctly) doesn't cover the newline. |
14 | | - Parens inside comments (whether YAML or Regex) are ignored. |
15 | | - </string> |
16 | | - <key>indentParens</key> |
17 | | - <false/> |
18 | | - <key>increaseIndentPattern</key> |
19 | | - <string><![CDATA[(?x)^ |
20 | | - (?<not_paren> |
21 | | - (?: |
22 | | - [^\\()]++ # anything that isn't a slash or a paren |
23 | | - | \\(?> # this is the "known_char_escape" variable from the syntax definition |
24 | | - [tnrfae] |
25 | | - | [0-7]{3} |
26 | | - | x \h\h |
27 | | - | x \{ \h{1,8} \} |
28 | | - | c \d+ |
29 | | - | C- \d+ |
30 | | - | M- \d+ |
31 | | - | M-\\C- \d+ |
32 | | - ) |
33 | | - | \\. # a single escape character |
34 | | - )*+ |
35 | | - ) |
36 | | - (?<balanced_paren>(?: |
37 | | - \( # an open paren |
38 | | - \g<not_paren> # followed by anything that's not a group-related paren |
39 | | - \g<balanced_paren> # followed by any number of nested parens |
40 | | - \g<not_paren> # followed by anything that's not a group-related paren |
41 | | - \) # a closing paren |
42 | | - )*+) |
43 | | - \g<not_paren> # followed by anything that's not a group-related paren |
44 | | - \( # followed by an unbalanced open paren |
45 | | - ]]></string> |
46 | | - <key>decreaseIndentPattern</key> |
47 | | - <string><![CDATA[(?x)^ |
48 | | - (?<not_paren> |
49 | | - (?: |
50 | | - [^\\()]++ # anything that isn't a slash or a paren |
51 | | - | \\(?> # this is the "known_char_escape" variable from the syntax definition |
52 | | - [tnrfae] |
53 | | - | [0-7]{3} |
54 | | - | x \h\h |
55 | | - | x \{ \h{1,8} \} |
56 | | - | c \d+ |
57 | | - | C- \d+ |
58 | | - | M- \d+ |
59 | | - | M-\\C- \d+ |
60 | | - ) |
61 | | - | \\. # a single escape character |
62 | | - )*+ |
63 | | - ) |
64 | | - (?<balanced_paren>(?: |
65 | | - \( # an open paren |
66 | | - \g<not_paren> # followed by anything that's not a group-related paren |
67 | | - \g<balanced_paren> # followed by any number of nested parens |
68 | | - \g<not_paren> # followed by anything that's not a group-related paren |
69 | | - \) # a closing paren |
70 | | - )*+) |
71 | | - \g<not_paren> # followed by anything that's not a group-related paren |
72 | | - \) # followed by an unbalanced close paren |
73 | | - ]]></string> |
74 | | - </dict> |
| 5 | + <key>scope</key> |
| 6 | + <string>(source.regexp, source.yaml.sublime.syntax meta.expect-regexp) - comment</string> |
| 7 | + <key>settings</key> |
| 8 | + <dict> |
| 9 | + <key>comment</key> |
| 10 | + <string> |
| 11 | + Indent any unclosed groups - open parens that don't have a corresponding closing paren on the same line. |
| 12 | + Unindent any closed groups - close parens that don't have a corresponding opening paren on the same line. |
| 13 | + Also apply to the `expect-regexp` meta scope, because otherwise a line like `- match: (?=\))` in a `.sublime-syntax` file would not have these rules applied to it because the `source.regexp` scope (correctly) doesn't cover the newline. |
| 14 | + Parens inside comments (whether YAML or Regex) are ignored. |
| 15 | + </string> |
| 16 | + <key>indentParens</key> |
| 17 | + <false/> |
| 18 | + <key>increaseIndentPattern</key> |
| 19 | + <string><![CDATA[(?x)^ |
| 20 | + (?<not_paren> |
| 21 | + (?: |
| 22 | + [^\\()]++ # anything that isn't a slash or a paren |
| 23 | + | \\(?> # this is the "known_char_escape" variable from the syntax definition |
| 24 | + [tnrfae] |
| 25 | + | [0-7]{3} |
| 26 | + | x \h\h |
| 27 | + | x \{ \h{1,8} \} |
| 28 | + | c \d+ |
| 29 | + | C- \d+ |
| 30 | + | M- \d+ |
| 31 | + | M-\\C- \d+ |
| 32 | + ) |
| 33 | + | \\. # a single escape character |
| 34 | + )*+ |
| 35 | + ) |
| 36 | + (?<balanced_paren>(?: |
| 37 | + \( # an open paren |
| 38 | + \g<not_paren> # followed by anything that's not a group-related paren |
| 39 | + \g<balanced_paren> # followed by any number of nested parens |
| 40 | + \g<not_paren> # followed by anything that's not a group-related paren |
| 41 | + \) # a closing paren |
| 42 | + )*+) |
| 43 | + \g<not_paren> # followed by anything that's not a group-related paren |
| 44 | + \( # followed by an unbalanced open paren |
| 45 | + ]]></string> |
| 46 | + <key>decreaseIndentPattern</key> |
| 47 | + <string><![CDATA[(?x)^ |
| 48 | + (?<not_paren> |
| 49 | + (?: |
| 50 | + [^\\()]++ # anything that isn't a slash or a paren |
| 51 | + | \\(?> # this is the "known_char_escape" variable from the syntax definition |
| 52 | + [tnrfae] |
| 53 | + | [0-7]{3} |
| 54 | + | x \h\h |
| 55 | + | x \{ \h{1,8} \} |
| 56 | + | c \d+ |
| 57 | + | C- \d+ |
| 58 | + | M- \d+ |
| 59 | + | M-\\C- \d+ |
| 60 | + ) |
| 61 | + | \\. # a single escape character |
| 62 | + )*+ |
| 63 | + ) |
| 64 | + (?<balanced_paren>(?: |
| 65 | + \( # an open paren |
| 66 | + \g<not_paren> # followed by anything that's not a group-related paren |
| 67 | + \g<balanced_paren> # followed by any number of nested parens |
| 68 | + \g<not_paren> # followed by anything that's not a group-related paren |
| 69 | + \) # a closing paren |
| 70 | + )*+) |
| 71 | + \g<not_paren> # followed by anything that's not a group-related paren |
| 72 | + \) # followed by an unbalanced close paren |
| 73 | + ]]></string> |
| 74 | + </dict> |
75 | 75 | </dict> |
76 | 76 | </plist> |
0 commit comments