Commit Graph

17 Commits

Author SHA1 Message Date
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} &gt;= 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} &lt; ${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