mirror of
https://github.com/kennethreitz-archive/kJS.tmbundle.git
synced 2026-06-05 23:50:19 +00:00
NEW Advanced Folding and Indent patterns!
Added switch…case tests
This commit is contained in:
@@ -11,18 +11,18 @@
|
||||
<string>jsx</string>
|
||||
</array>
|
||||
<key>foldingStartMarker</key>
|
||||
<string>(?x)^ \s* ([^\s].*)?
|
||||
# Open (nothing | no parens | (no parens? (nested parens ) no parens?)+ )
|
||||
( \[ (?: | (?<noR>[^\[\]]++) | (\g<noR>? (?<round> \[ (?: \g<noR> | \g<round> )* \] ) \g<noR>? )++ )
|
||||
| \( (?: | (?<noS>[^\(\)]++) | (\g<noS>? (?<squar> \( (?: \g<noS> | \g<squar> )* \) ) \g<noS>? )++ )
|
||||
| \{ (?: | (?<noC>[^\{\}]++) | (\g<noC>? (?<curly> \{ (?: \g<noC> | \g<curly> )* \} ) \g<noC>? )++ )
|
||||
<string>(?x)^ \s* (?!//|/\*)([^\s].*)?
|
||||
# Open (nothing | ( string | no parens )+ | (no parens? (nested parens ) no parens?)+ )
|
||||
( \[ (?: | ( (?<str> '(\\'|[^'])*+' | "(\\"|[^"])*+" | /(\\/|[^/])*+/) | (?<noR>[^\[\]'"/]++) )++ | (\g<noR>? (?<round> \[ (?: \g<str> | \g<noR> | \g<round> )* \] ) \g<noR>? )++ )
|
||||
| \( (?: | ( \g<str> | (?<noS>[^\(\)'"/]++) )++ | (\g<noS>? (?<squar> \( (?: \g<str> | \g<noS> | \g<squar> )* \) ) \g<noS>? )++ )
|
||||
| \{ (?: | ( \g<str> | (?<noC>[^\{\}'"/]++) )++ | (\g<noC>? (?<curly> \{ (?: \g<str> | \g<noC> | \g<curly> )* \} ) \g<noC>? )++ )
|
||||
)$</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>(?x)^ \s*
|
||||
# (nothing | no parens | (no parens? (nested parens ) no parens?)+ ) Close
|
||||
( (?: | (?<noR>[^\[\]]++) | (\g<noR>? (?<round> \[ (?: \g<noR> | \g<round> )* \] ) \g<noR>? )++ ) \]
|
||||
| (?: | (?<noS>[^\(\)]++) | (\g<noS>? (?<squar> \( (?: \g<noS> | \g<squar> )* \) ) \g<noS>? )++ ) \)
|
||||
| (?: | (?<noC>[^\{\}]++) | (\g<noC>? (?<curly> \{ (?: \g<noC> | \g<curly> )* \} ) \g<noC>? )++ ) \}
|
||||
<string>(?x)^ \s* (?!//|/\*)
|
||||
# (nothing | ( string | no parens )+ | (no parens? (nested parens ) no parens?)+ ) Close
|
||||
( (?: | ( (?<str> '(\\'|[^'])*+' | "(\\"|[^"])*+" | /(\\/|[^/])*+/) | (?<noR>[^\[\]'"/]++) )++ | (\g<noR>? (?<round> \[ (?: \g<str> | \g<noR> | \g<round> )* \] ) \g<noR>? )++ ) \]
|
||||
| (?: | ( \g<str> | (?<noS>[^\(\)'"/]++) )++ | (\g<noS>? (?<squar> \( (?: \g<str> | \g<noS> | \g<squar> )* \) ) \g<noS>? )++ ) \)
|
||||
| (?: | ( \g<str> | (?<noC>[^\{\}'"/]++) )++ | (\g<noC>? (?<curly> \{ (?: \g<str> | \g<noC> | \g<curly> )* \} ) \g<noC>? )++ ) \}
|
||||
)</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~J</string>
|
||||
|
||||
Reference in New Issue
Block a user