mirror of
https://github.com/kennethreitz-archive/kJS.tmbundle.git
synced 2026-06-05 23:50:19 +00:00
Added a better indent pref. Added some handy snippets. Added some handy scopes to the language
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@4352 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?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>JavaScript Indent</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>decreaseIndentPattern</key>
|
||||
<string>^(.*\*/)?\s*(\}|\))([^{]*\{)?([;,]?\s*|\.[^{]*|\s*\)[;\s]*)$</string>
|
||||
<key>increaseIndentPattern</key>
|
||||
<string>^.*(\{[^}"']*|\([^)"']*)$</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>BC062860-3346-4D3B-8421-C5543F83D11F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?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>content</key>
|
||||
<string>for (var ${20:i}=0; ${20:i} < ${1:Things}.length; ${20:i}++) {
|
||||
${100:${1:Things}[${20:i}]}$0
|
||||
};</string>
|
||||
<key>name</key>
|
||||
<string>for (…) {…}</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>for</string>
|
||||
<key>uuid</key>
|
||||
<string>011C4681-FBEC-4891-9326-3DECFCDED6D6</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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>content</key>
|
||||
<string>function($1){${0:$TM_SELECTED_TEXT}};</string>
|
||||
<key>name</key>
|
||||
<string>function(){};</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>f</string>
|
||||
<key>uuid</key>
|
||||
<string>4C6EDB43-3E2E-411B-A016-13C135C59833</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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>content</key>
|
||||
<string>if(${1:true}){${0:$TM_SELECTED_TEXT}}else{};</string>
|
||||
<key>name</key>
|
||||
<string>if ... else</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>ife</string>
|
||||
<key>uuid</key>
|
||||
<string>31964029-9D71-4ADC-8213-DFE5C4E222B3</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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>content</key>
|
||||
<string>if(${1:true}){${0:$TM_SELECTED_TEXT}};</string>
|
||||
<key>name</key>
|
||||
<string>if</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>if</string>
|
||||
<key>uuid</key>
|
||||
<string>F19F3732-39A7-48EC-A72B-A8F477A01795</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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>content</key>
|
||||
<string>setTimeout((function() {$0})${2:}, ${1:10});</string>
|
||||
<key>name</key>
|
||||
<string>setTimeout function</string>
|
||||
<key>scope</key>
|
||||
<string>source.js</string>
|
||||
<key>tabTrigger</key>
|
||||
<string>timeout</string>
|
||||
<key>uuid</key>
|
||||
<string>009A3E6C-FE3F-4A18-8759-2DC31F17BBE2</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -65,7 +65,7 @@
|
||||
<key>comment</key>
|
||||
<string>match stuff like: foobar: function() { … }</string>
|
||||
<key>match</key>
|
||||
<string>^\s*\b([a-zA-Z_?\.$]+\w*):\s+\b(function)?\s*\((.*?)\)</string>
|
||||
<string>\b([a-zA-Z_?\.$]+\w*):\s+\b(function)?\s*\((.*?)\)</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.js</string>
|
||||
</dict>
|
||||
@@ -104,26 +104,50 @@
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>'</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.single.brace.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>contentName</key>
|
||||
<string>string.quoted.single.js</string>
|
||||
<key>end</key>
|
||||
<string>'</string>
|
||||
<key>name</key>
|
||||
<string>string.quoted.single.js</string>
|
||||
<key>swallow</key>
|
||||
<string>\\.</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.brace.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>contentName</key>
|
||||
<string>string.quoted.double.js</string>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.js</string>
|
||||
<key>swallow</key>
|
||||
<string>\\.</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>/\*</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>meta.brace.comment.block.js</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\*/</string>
|
||||
<key>name</key>
|
||||
@@ -248,6 +272,42 @@
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\;</string>
|
||||
<key>name</key>
|
||||
<string>meta.delimiter.statement.semicolon.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>,[ |\t]*</string>
|
||||
<key>name</key>
|
||||
<string>meta.delimiter.object.comma.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\.</string>
|
||||
<key>name</key>
|
||||
<string>meta.delimiter.method.period.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\{|\}</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.curly.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\(|\)</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.round.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\[|\]</string>
|
||||
<key>name</key>
|
||||
<string>meta.brace.square.js</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>source.js</string>
|
||||
|
||||
+13
@@ -10,6 +10,13 @@
|
||||
<string>------------------------------------</string>
|
||||
<string>F0E4FB6A-4878-48C6-A777-62438DF1E14F</string>
|
||||
<string>2F96136B-0193-42F5-90FC-B6F456A3AD77</string>
|
||||
<string>------------------------------------</string>
|
||||
<string>F19F3732-39A7-48EC-A72B-A8F477A01795</string>
|
||||
<string>31964029-9D71-4ADC-8213-DFE5C4E222B3</string>
|
||||
<string>011C4681-FBEC-4891-9326-3DECFCDED6D6</string>
|
||||
<string>4C6EDB43-3E2E-411B-A016-13C135C59833</string>
|
||||
<string>------------------------------------</string>
|
||||
<string>009A3E6C-FE3F-4A18-8759-2DC31F17BBE2</string>
|
||||
</array>
|
||||
<key>submenus</key>
|
||||
<dict/>
|
||||
@@ -22,6 +29,12 @@
|
||||
<string>F0E4FB6A-4878-48C6-A777-62438DF1E14F</string>
|
||||
<string>2F96136B-0193-42F5-90FC-B6F456A3AD77</string>
|
||||
<string>93E017CC-6F27-11D9-90EB-000D93589AF6</string>
|
||||
<string>BC062860-3346-4D3B-8421-C5543F83D11F</string>
|
||||
<string>F19F3732-39A7-48EC-A72B-A8F477A01795</string>
|
||||
<string>31964029-9D71-4ADC-8213-DFE5C4E222B3</string>
|
||||
<string>4C6EDB43-3E2E-411B-A016-13C135C59833</string>
|
||||
<string>011C4681-FBEC-4891-9326-3DECFCDED6D6</string>
|
||||
<string>009A3E6C-FE3F-4A18-8759-2DC31F17BBE2</string>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>AAB4FD74-73F9-11D9-B89A-000D93589AF6</string>
|
||||
|
||||
Reference in New Issue
Block a user