Thomas Aylott
ad7c0e4007
create element and populate smart snippet
2009-10-05 12:40:39 -04:00
Thomas Aylott
08d9a23e41
t ⇥ this snippet
2009-10-05 12:39:38 -04:00
Thomas Aylott
1f5998b73b
a ⇥ arguments snippet
2009-10-05 12:39:06 -04:00
Thomas Aylott
507153ff45
tab completions to convert arguments to Array.prototype.slice.call(arguments) and back.
2009-10-05 12:38:33 -04:00
Thomas Aylott
639c28afba
updated try/catch snippet
2009-10-05 12:34:44 -04:00
Thomas Aylott
efb280004c
changed console.assert tab completion to "ass", yes.
2009-10-05 12:30:56 -04:00
Thomas Aylott
7373ab549f
updated mootools url
2009-10-05 12:30:24 -04:00
Thomas Aylott
b3ea098912
prototype snippet like the docand win snippets
2009-04-29 15:10:33 -04:00
Thomas Aylott
918b38f11a
standalone jsspec file snippet
2009-04-29 15:10:11 -04:00
Thomas Aylott
a94885b7cb
Class Closure Idiom Snippet
2009-04-29 15:09:52 -04:00
Thomas Aylott
8f3bd1c585
changed tab completion word for greater unification
2009-04-29 15:09:32 -04:00
Thomas Aylott
1e3869017a
many snippets for common idioms
2009-04-17 17:41:53 -04:00
Thomas Aylott
2fedbea18a
new closure snippet
2009-02-15 08:14:36 +00:00
Thomas Aylott
f2501c8d2f
added wrapping support to a few snippets
2009-02-15 08:14:36 +00:00
Thomas Aylott
67ed84b3e0
Beginning README
...
addEventListener snippet default to bubbling
Updated info.plist
2009-02-15 08:14:35 +00:00
Thomas Aylott
fd574d60c2
Renamed the "normal" for loop to "for (…) {…} (Classic)"
...
diff --git "a/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet" "b/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet"
index 9001c98..c6ddbf7 100644
--- "a/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet"
+++ "b/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet"
@@ -7,7 +7,7 @@
${0:$1[$20]}
}</string>
<key>name</key>
- <string>for (…) {…}</string>
+ <string>for (…) {…} (Classic)</string>
<key>scope</key>
<string>source.js</string>
<key>tabTrigger</key>
2009-02-15 08:14:35 +00:00
Thomas Aylott
3f8ff5c7c4
New snippets for switch / case
2009-02-15 08:14:35 +00:00
Thomas Aylott
04e15e1473
onload listener snippet
2009-02-15 08:14:34 +00:00
Thomas Aylott
f77ae2743e
new window. snippet like the current document. snippet
2009-02-15 08:14:33 +00:00
Thomas Aylott
39d3a191cc
Updated proto snippet to match the new style of snippets for this bundle
2009-02-15 08:14:33 +00:00
Thomas Aylott
c89827b256
Removed some poorly thought out snippets.
...
Unified the for snippets some more
New for snippet for fast DOM iteration
2009-02-15 08:14:32 +00:00
Thomas Aylott
0dd03607c2
Unifying snippet formats
2009-02-15 08:14:32 +00:00
Thomas Aylott
34ca3c1df7
Changed the forin snippet to match what it actually does
2009-02-15 08:14:32 +00:00
Thomas Aylott
5125bf5db1
Snippet: try … catch
2009-02-15 08:14:31 +00:00
subtlegradient
52fedbc920
New document. snippet, because you end up typing that a billion times
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10174 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-05 23:42:42 +00:00
subtlegradient
de7b84b470
Attempting to unify the style of the various snippets. The idea is that if it's fewer characters to add something than to remove it, then it gets removed from the snippet.
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10173 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-05 23:42:37 +00:00
subtlegradient
78f785b43d
Removed the anonymous function from the timeout snippet. You can easily add your own with the f snippet
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10172 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-05 23:42:29 +00:00
subtlegradient
bba6f216d7
Degault the Get Elements snippet to getElementById instead of getElementsByTagName
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10171 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-05 23:42:24 +00:00
subtlegradient
be9de4befd
Internet Explorer Conditional Comment snippets
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10114 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-02 17:01:58 +00:00
subtlegradient
7ca0d476cf
Unifying the "for" snippets
...
diff --git "a/Snippets/for (in) {\342\200\246}.tmSnippet" "b/Snippets/for (in) {\342\200\246}.tmSnippet"
index d7e0848..b64dede 100644
--- "a/Snippets/for (in) {\342\200\246}.tmSnippet"
+++ "b/Snippets/for (in) {\342\200\246}.tmSnippet"
@@ -3,8 +3,8 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>for (var ${1:x} in ${2:Things}) {
- ${0:${1:x}}
+ <string>for (var ${1:thing} in ${2:Things}) {
+ $0${1:thing}
};</string>
<key>name</key>
<string>for (in) {…}</string>
diff --git "a/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet" "b/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet"
index b34c0f5..9408455 100644
--- "a/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet"
+++ "b/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet"
@@ -4,7 +4,7 @@
<dict>
<key>content</key>
<string>for (var ${20:i}=0,${2:thing}; ${2:thing}=${1:Things}[${20:i}]; ${20:i}++){
- ${2:thing}$0
+ $0${2:thing}
};
</string>
<key>name</key>
diff --git "a/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet" "b/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet"
index 34e6b71..2853eb2 100644
--- "a/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet"
+++ "b/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet"
@@ -1,10 +1,10 @@
<?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 ">
+<!DOCTYPE plist PUBLIC "-//Apple//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} = ${1:Things}.length - 1; ${20:i} >= 0; ${20:i}--){
- ${100:${1:Things}[${20:i}]}$0
+ $0${100:${1:Things}[${20:i}]}
};</string>
<key>name</key>
<string>for (…) {…} (Improved Native For-Loop)</string>
diff --git "a/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet" "b/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet"
index 6208a16..852d3f5 100644
--- "a/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet"
+++ "b/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet"
@@ -4,7 +4,7 @@
<dict>
<key>content</key>
<string>for (var ${20:i}=0; ${20:i} < ${1:Things}.length; ${20:i}++) {
- ${100:${1:Things}[${20:i}]}$0
+ $0${100:${1:Things}[${20:i}]}
};</string>
<key>name</key>
<string>for (…) {…}</string>
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10103 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-02 17:00:59 +00:00
subtlegradient
7a80c6d2ab
Fixed snippet. I'd accidentally sent a half-finished version :'(
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@9129 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-03-16 06:14:13 +00:00
subtlegradient
bc39c3bdca
Cleaned up "for in" snippets and added a new ultra-fast one from quirksmode.
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@9114 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-03-14 18:31:48 +00:00
subtlegradient
b6f84d2641
New "for (in){…}" snippet
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8634 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-09 08:20:27 +00:00
subtlegradient
1f347c3df7
Cleaned up snippets
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8633 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-09 08:19:31 +00:00
subtlegradient
5335a0d676
Copying JavaScript to review
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8600 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-05 18:44:38 +00:00
subtlegradient
0539e44989
Removed old bas scope
...
Set ⌥⇧: as the shortcut for object keys
Set the trigger for "for faster" to "for" to get the menu
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6595 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-02-15 04:34:38 +00:00
subtlegradient
dcb51d605c
Fixed bad copy/paste. It was an em-dash not a -- :/
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6542 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-02-09 15:37:15 +00:00
subtlegradient
8918fc0380
Added the "Improved Native For-Loop" snippet from http://solutoire.com/2007/02/02/efficient-looping-in-javascript/
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6518 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-02-03 07:52:40 +00:00
cskiadas
5fdf24b4fa
First attempt at rearranging.
...
Added getElement snippet.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5720 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-10-29 19:52:42 +00:00
haraldmartin
704e02f030
• Added a really handy snippet for all iteration methods. Instead of typing 'each' and then ⇥ (tab) to get the each snippet, you now press ⇧⌃⌘( and you'll get the iterator function. Therefore this works for all iterator functions (inject, reject, each, map etc)
...
• Moved more of the genreric JavaScript snippets (subtleGradient's?) from Prototype → JS bundle
• Added whitespace around '=' and ':' in the Create Class alt snippet (we aren't afraid of whitespace, are we?)
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5310 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-09-26 15:50:54 +00:00
haraldmartin
7c8a8d1c75
• ⇧↩ (shift + enter) will turn the current word as a function (like the ruby one does). ⇧⌃↩ (shift + control + enter) will make it into a method instead (blah: function() { ... })
...
• Cleaned up some snippets like setTimeout and the if/if else/function and others
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5308 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-09-26 15:20:02 +00:00
duff
fa12f1385a
• use the ellipsis glyph (…) instead of three periods
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@4374 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-07-17 11:24:53 +00:00
subtlegradient
3f366bbbbb
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
2006-07-17 07:55:50 +00:00
duff
6392496e90
• remove mention of tab trigger from the name
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@3648 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-06-14 02:52:10 +00:00
duff
5a2572890b
• add prototype snippet from Mike Ter Louw
...
• fix comment character in function snippet
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2721 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-02-20 11:02:30 +00:00
duff
558a9b2102
• snippet to create a js function
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@1325 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-07-11 23:49:10 +00:00