mirror of
https://github.com/kennethreitz-archive/kJS.tmbundle.git
synced 2026-06-05 23:50:19 +00:00
39 lines
2.9 KiB
Plaintext
39 lines
2.9 KiB
Plaintext
<?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>name</key>
|
|
<string>Indent</string>
|
|
<key>scope</key>
|
|
<string>source.js, source.json</string>
|
|
<key>settings</key>
|
|
<dict>
|
|
<key>decreaseIndentPattern</key>
|
|
<string>(?x)^
|
|
# ( Blank |Comments | (No Paren | String) | String | (Nested Parens ) )*+ Close Yes *+
|
|
(?> (?<yesS> (?!.) |//.*+|/\*((?!\*/).)++(\*/|$)|(^)((?!/\*).)*(\*/)| (?<noS>[^\[\]'"/]) | (?<str> '(\\'|[^'])*+' | "(\\"|[^"])*+" | /(\\/|[^/])*+/) | (?<squar> \[ \g<yesS>*+ \] ) )*+ \] \g<yesS>*+
|
|
| (?<yesR> (?!.) |//.*+|/\*((?!\*/).)++(\*/|$)|(^)((?!/\*).)*(\*/)| (?<noR>[^\(\)'"/]) | \g<str> | (?<round> \( \g<yesR>*+ \) ) )*+ \) \g<yesR>*+
|
|
| (?<yesC> (?!.) |//.*+|/\*((?!\*/).)++(\*/|$)|(^)((?!/\*).)*(\*/)| (?<noC>[^\{\}'"/]) | \g<str> | (?<curly> \{ \g<yesC>*+ \} ) )*+ \} \g<yesC>*+
|
|
| \s* (?!//|/\*) \b(?:case|default)\b
|
|
(\g<str> | \g<noC> | \g<noC>? \g<curly> \b<noC>?)++ (?!\})
|
|
$
|
|
)</string>
|
|
<key>increaseIndentPattern</key>
|
|
<string>(?x)^
|
|
# Yes *+ Open ( Blank |Comments | (No Paren | String) | String | (Nested Parens ) )*+
|
|
(?> \g<yesS>*+ \[ (?<yesS> (?!.) |//.*+|/\*((?!\*/).)++(\*/|$)|(^)((?!/\*).)*(\*/)| (?<noS>[^\[\]'"/]) | (?<str> '(\\'|[^'])*+' | "(\\"|[^"])*+" | /(\\/|[^/])*+/) | (?<squar> \[ \g<yesS>*+ \] ) )*+
|
|
| \g<yesR>*+ \( (?<yesR> (?!.) |//.*+|/\*((?!\*/).)++(\*/|$)|(^)((?!/\*).)*(\*/)| (?<noR>[^\(\)'"/]) | \g<str> | (?<round> \( \g<yesR>*+ \) ) )*+
|
|
| \g<yesC>*+ \{ (?<yesC> (?!.) |//.*+|/\*((?!\*/).)++(\*/|$)|(^)((?!/\*).)*(\*/)| (?<noC>[^\{\}'"/]) | \g<str> | (?<curly> \{ \g<yesC>*+ \} ) )*+
|
|
| \s* (?!//|/\*)([^\s].*)? \b(?:case|default)\b
|
|
(\g<str> | \g<noC> | \g<noC>? \g<curly> \b<noC>?)++ (?!\})
|
|
)$</string>
|
|
<key>indentNextLinePattern</key>
|
|
<string>^\s*((if|while|for|switch|else if).*[)]|else)\s*$</string>
|
|
<key>unIndentedLinePattern</key>
|
|
<string>(?x)^ \s* /\* ((?!\*/).)++ $ | ^\s\* | ^\s* \*/\s* $ | ^ \s* $</string>
|
|
</dict>
|
|
<key>uuid</key>
|
|
<string>BC062860-3346-4D3B-8421-C5543F83D11F</string>
|
|
</dict>
|
|
</plist>
|