Commit Graph

132 Commits

Author SHA1 Message Date
Thomas Aylott 2fec3ebc31 Removed the // smart string 2008-08-18 10:33:34 -04:00
Thomas Aylott b62b480d16 New snippets for switch / case 2008-08-18 10:32:07 -04:00
Thomas Aylott c37f9a2552 Fix an issue where a @ in a block comment would cause IE conditional comment matching for the rest of the document 2008-08-18 10:30:37 -04:00
Thomas Aylott d6b73efb6b Updated info.plist 2008-08-04 16:37:54 -04:00
Thomas Aylott adf5c194b2 smartTypingPairs, highlightPairs; Regular and in Strings 2008-08-04 16:36:19 -04:00
Thomas Aylott 6216d42c75 Fixed indent rules for single-line case statements 2008-08-04 16:35:06 -04:00
Thomas Aylott e3900be05a NEW Advanced Folding and Indent patterns!
Added switch…case tests
2008-08-04 14:34:18 -04:00
Thomas Aylott 3c47885cfa More advanced indent & folding tests 2008-08-04 12:16:54 -04:00
Thomas Aylott b8efd98c2a Special indent/folding tests 2008-08-04 11:02:00 -04:00
Thomas Aylott 80a418e66b updated info.plist for new stuff 2008-08-04 10:48:10 -04:00
Thomas Aylott 3b07658fe5 onload listener snippet 2008-08-04 10:47:45 -04:00
Thomas Aylott 7013ea5911 new window. snippet like the current document. snippet 2008-08-04 10:47:07 -04:00
Thomas Aylott bff49bbc00 Updated proto snippet to match the new style of snippets for this bundle 2008-08-04 10:46:40 -04:00
Thomas Aylott 32eedf8f10 New Help command
Beginning Help document / GitHub readme
2008-08-04 10:44:42 -04:00
Thomas Aylott f7b1a5c139 NEW: Advanced folding rules
Added more Tests for folding and indent
2008-08-04 10:41:36 -04:00
Thomas Aylott ec65f333b5 Folding & Indent Test 2008-08-03 12:37:11 -04:00
Thomas Aylott e696cf88a3 Tests for labels and new new 2008-07-28 10:49:24 -04:00
Thomas Aylott cd58b83794 Removed some poorly thought out snippets.
Unified the for snippets some more
New for snippet for fast DOM iteration
2008-07-25 18:27:42 -04:00
Thomas Aylott 1fcef564b0 Added operators to the syntax tests and more examples 2008-07-19 18:13:17 -04:00
Thomas Aylott f62ab505b7 Unifying snippet formats 2008-07-19 18:11:57 -04:00
Thomas Aylott a6b41e8392 Trying to come up with an exhaustive list of all literal syntax 2008-07-08 18:41:48 -04:00
Thomas Aylott cf8398b67d Syntax Tests for Function Calls and Variables / Properties 2008-07-08 17:11:56 -04:00
Thomas Aylott 4edcfcb0c7 Removed the conditional-compilation since I moved it into the other syntax 2008-07-08 16:59:55 -04:00
Thomas Aylott 879f4c5c9d Changed the forin snippet to match what it actually does 2008-07-08 16:57:47 -04:00
Thomas Aylott 60bf481bf5 Added special-comments-conditional-compilation for IE; Added leading-space scopes 2008-07-08 16:55:46 -04:00
Thomas Aylott 8f08e77bdd Snippet: try … catch 2008-07-08 16:54:39 -04:00
Thomas Aylott 3441b11cc2 Fixed the illegal number scopes 2008-07-07 13:16:07 -04:00
Thomas Aylott 7d3632c085 .999 numbers.invalid scopes for octal and hex. -999 and +999 numbers 2008-07-07 13:07:57 -04:00
Thomas Aylott dad2829a89 Reorganize the JavaScript Basic syntax. Moved everything into the repository. 2008-07-07 12:11:41 -04:00
subtlegradient 3e3082b4d4 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-07 12:11:41 -04:00
subtlegradient 9befbaa4c5 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-07 12:11:41 -04:00
subtlegradient ec99bb4c5c 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-07 12:11:41 -04:00
subtlegradient 7a68cfb531 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-07 12:11:41 -04:00
subtlegradient c18a767790 Improved String Literal syntax. Fixed the "bug" where an unclosed string extends past the closign script tag in html.
String should end on \n with a syntax error
String should end on </script>\n with a syntax error
String should mark </script> as invalid

git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10170 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-07 12:11:41 -04:00
subtlegradient a8b22dbdda More and more syntax tests
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10169 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-07-07 12:11:41 -04:00
Thomas Aylott 1899a8afde Internet Explorer Conditional Comment snippets 2008-07-02 13:00:07 -04:00
Thomas Aylott 3c2791d816 Removed redundant group scope 2008-07-02 12:57:58 -04:00
Thomas Aylott 205fd81c21 More syntax tests 2008-07-02 12:57:25 -04:00
Joseph Pecoraro 73900868d5 Scientific notation => Ex, 1e5 and 2.5E5
from Joseph Pecoraro
2008-07-02 12:52:49 -04:00
Thomas Aylott 6fa933fc13 Don't require a space after the function keyword
Merging in a modified version of Joseph Pecoraro's fix here: http://pastie.textmate.org/private/hxkpy8qkahofrxwyvp4coq
2008-07-02 12:42:58 -04:00
Joseph Pecoraro 0bdaea84f6 Merging in the regex fixes from Joseph Pecoraro as seen here: http://lists.macromates.com/textmate/2008-June/025973.html 2008-07-02 12:36:52 -04:00
Thomas Aylott b33bf433e4 Some syntax tests 2008-07-02 12:19:40 -04:00
Thomas Aylott ee10b85ff5 Impriving regexp literals 2008-07-02 12:17:34 -04:00
Thomas Aylott f355cab4ce Undefined -> undefined 2008-07-02 11:47:48 -04:00
Thomas Aylott 2be7a89002 Improved meta.function.json.js with punctuation and proper storage.type 2008-07-02 11:44:06 -04:00
Thomas Aylott 16eb9fd504 Added a tests folder with some starter files 2008-07-02 11:04:44 -04:00
Thomas Aylott 7e0e08cd6a 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>
2008-07-02 11:04:01 -04:00
subtlegradient b84367b126 Fixed regression with nested groups and functions
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@9131 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-03-16 06:35:43 +00:00
subtlegradient bb8deef61d Tweaking regex for optimization and performance. disabling "punctuation.section.scope.round" seems to have helped.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@9130 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2008-03-16 06:16:45 +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